diff --git a/src/model/stat.rs b/src/model/stat.rs
index bece501..05d7ea2 100644
--- a/src/model/stat.rs
+++ b/src/model/stat.rs
@@ -52,6 +52,10 @@ impl BoatStat {
let name: String = row.get("name");
let location: String = row.get("location");
let year: i32 = row.get("year");
+ if year == 0 {
+ continue; // Boat still on water
+ }
+
if !years.contains(&year) {
years.push(year);
}
diff --git a/templates/stat.boats.html.tera b/templates/stat.boats.html.tera
index b75eb1b..0aed44d 100644
--- a/templates/stat.boats.html.tera
+++ b/templates/stat.boats.html.tera
@@ -1,24 +1,44 @@
{% import "includes/macros" as macros %}
{% extends "base" %}
{% block content %}
+
Bootsauswertung
-
-
-
- Name |
- Ort |
- {% for year in stat.pot_years | sort | reverse %}{{ year }} | {% endfor %}
-
-
-
- {% for boat in stat.boats %}
+
+
+
- {{ boat.name }} |
- {{ boat.location }} |
- {% for year in stat.pot_years | sort | reverse %}
-
- {% if year~'' in boat.years %}{{ boat.years[year] }}{% endif %}
+ | Name |
+ Ort |
+ {% for year in stat.pot_years | sort | reverse %}{{ year }} | {% endfor %}
+
+
+
+ {% for boat in stat.boats %}
+
+ {{ boat.name }} |
+ {{ boat.location }} |
+ {% for year in stat.pot_years | sort | reverse %}
+
+ {% if year~'' in boat.years %}
+ {{ boat.years[year] }}
+ {% else %}
+ 0
+ {% endif %}
|
{% endfor %}
@@ -26,6 +46,14 @@
-
-
- {% endblock content %}
+
+
+
+{% endblock content %}