Commit 228137f2 authored by Hermann Krumrey's avatar Hermann Krumrey

Merge branch 'develop' into 'master'

Develop

See merge request namibsun/python/bundesliga-tippspiel!11
parents 9b944468 77f85bab
V 0.16.5:
- Fixed issues with updating match data
V 0.16.4:
- Fixed unclickable links in emails
- Removed comments from rendered HTML templates
......
......@@ -136,8 +136,6 @@ class Match(ModelMixin, db.Model):
delta = (datetime.utcnow() - self.kickoff_datetime).total_seconds()
delta = int(delta / 60)
print(delta)
if self.finished:
return "Ende"
elif 0 <= delta <= 44:
......
......@@ -35,5 +35,7 @@ def load_routes():
import bundesliga_tippspiel.routes.betting
# noinspection PyUnresolvedReferences
import bundesliga_tippspiel.routes.information
# noinspection PyUnresolvedReferences
# import bundesliga_tippspiel.routes.errors
load_api_routes()
"""LICENSE
Copyright 2017 Hermann Krumrey <hermann@krumreyh.com>
This file is part of bundesliga-tippspiel.
bundesliga-tippspiel is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
bundesliga-tippspiel is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with bundesliga-tippspiel. If not, see <http://www.gnu.org/licenses/>.
LICENSE"""
# from flask import redirect, url_for, flash
# from bundesliga_tippspiel import app
# from bundesliga_tippspiel.types.enums import AlertSeverity
# @app.errorhandler(401)
# def unauthorized(_):
# """
# Custom redirect for 401 errors
# :return: A redirect to the login page
# """
# flash(
# "Du bist nicht angemeldet. Bitte melde dich an.",
# AlertSeverity.DANGER.value
# )
# return redirect(url_for("login"))
......@@ -146,6 +146,12 @@ def parse_goal(goal_data: Dict[str, Any], match_id: int) -> Optional[Goal]:
return None
minute = goal_data["MatchMinute"]
# Minute defaults to 0 in case the minute data is missing.
# This keeps the entire thing from imploding.
if minute is None:
minute = 0
minute_et = 0
if minute > 90:
minute_et = minute - 90
......
0.16.4
\ No newline at end of file
0.16.5
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment