Loading CHANGELOG +2 −0 Original line number Diff line number Diff line 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 Loading bundesliga_tippspiel/models/match_data/Match.py +0 −2 Original line number Diff line number Diff line Loading @@ -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: Loading bundesliga_tippspiel/routes/__init__.py +2 −0 Original line number Diff line number Diff line Loading @@ -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() bundesliga_tippspiel/routes/errors.py 0 → 100644 +35 −0 Original line number Diff line number Diff line """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")) bundesliga_tippspiel/utils/match_data_getter.py +6 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
CHANGELOG +2 −0 Original line number Diff line number Diff line 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 Loading
bundesliga_tippspiel/models/match_data/Match.py +0 −2 Original line number Diff line number Diff line Loading @@ -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: Loading
bundesliga_tippspiel/routes/__init__.py +2 −0 Original line number Diff line number Diff line Loading @@ -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()
bundesliga_tippspiel/routes/errors.py 0 → 100644 +35 −0 Original line number Diff line number Diff line """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"))
bundesliga_tippspiel/utils/match_data_getter.py +6 −0 Original line number Diff line number Diff line Loading @@ -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 Loading