From 326fa3e9269fe48a5a97f286e000e52fce96bd21 Mon Sep 17 00:00:00 2001 From: Burathar Date: Wed, 22 Jul 2020 20:49:09 +0200 Subject: [PATCH] Add Delete Game Button --- app/main/routes.py | 2 +- app/templates/game_owner_dashboard.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main/routes.py b/app/main/routes.py index bab9237..b9328b0 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -53,7 +53,7 @@ def delete_game(game_name): if not game.owned_by(current_user): abort(403) db.session.delete(game) - for user in game.players: + for user in game.users: if not user.last_login: db.session.delete(user) db.session.commit() diff --git a/app/templates/game_owner_dashboard.html b/app/templates/game_owner_dashboard.html index b493bb1..87c3a34 100644 --- a/app/templates/game_owner_dashboard.html +++ b/app/templates/game_owner_dashboard.html @@ -9,6 +9,9 @@ {% block app_content %}

{{ game.name }} Dashboard

+ + + {% if game.unreviewed_bunny_photos() %}