From c735463f951743c885400cdb60fa9e9144a186fb Mon Sep 17 00:00:00 2001 From: Burathar Date: Tue, 28 Jul 2020 14:58:50 +0200 Subject: [PATCH] change game.state references to game.get_state --- app/main/routes.py | 2 +- app/templates/_game_player_info.html | 2 +- app/templates/game_owner_dashboard.html | 2 +- app/templates/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/main/routes.py b/app/main/routes.py index 144a3c0..5ca0715 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -64,7 +64,7 @@ def change_game_settings(game_name): form.old_name = game.name if request.method == 'GET': - form.state.default = game.state.value + form.state.default = game.get_state().value # pylint: disable=no-member form.process() form.game_name.data = game.name diff --git a/app/templates/_game_player_info.html b/app/templates/_game_player_info.html index 3843b12..17e994f 100644 --- a/app/templates/_game_player_info.html +++ b/app/templates/_game_player_info.html @@ -15,7 +15,7 @@ Game State - {{ game.state.name.title() }} + {{ game.get_state().name.title() }} Start Time diff --git a/app/templates/game_owner_dashboard.html b/app/templates/game_owner_dashboard.html index 3fb9212..42247f1 100644 --- a/app/templates/game_owner_dashboard.html +++ b/app/templates/game_owner_dashboard.html @@ -21,7 +21,7 @@

Start Time: {% if game.start_time %}{{ moment(game.start_time).format('DD-MM-YYYY, HH:mm') }}{% else %}None{% endif %}

End Time: {% if game.end_time %}{{ moment(game.end_time).format('DD-MM-YYYY, HH:mm') }}{% else %}None{% endif %}

-

State: {{ game.state.name.title() }}

+

State: {{ game.get_state().name.title() }}

Players:

Add player

diff --git a/app/templates/index.html b/app/templates/index.html index b76abf0..c962b3e 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -28,7 +28,7 @@ {% for game in current_user.games %} {{ game.name }} - {{ game.state.name.title() }} + {{ game.get_state().name.title() }} {{ game.start_time }} {{ game.end_time }}