Month has to be specified with 2 digits, year with 4 digits.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 26 Feb 2019 22:26:24 +0000 (23:26 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 26 Feb 2019 22:26:24 +0000 (23:26 +0100)
web/seepark_web.py

index 1a6c7c6..471d716 100644 (file)
@@ -365,9 +365,9 @@ def currentwater(version):
     return jsonify({"value": value, "timestamp": timestamp})
 
 
-@app.route('/report/<int:year>/<int:month>')
+@app.route('/report/<int(fixed_digits=4):year>/<int(fixed_digits=2):month>')
 def report(year, month):
-    """Report for given year and month
+    """Report for given year (4 digits) and month (2 digits)
     """
     paper_size = (29.7 / 2.54, 21. / 2.54)  # A4