From e783ab96663d794d90be95e27c7337319293f2bb Mon Sep 17 00:00:00 2001 From: Yan Date: Mon, 22 Jan 2024 22:41:56 -0700 Subject: [PATCH] debugging --- dojo_plugin/api/v1/dojo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dojo_plugin/api/v1/dojo.py b/dojo_plugin/api/v1/dojo.py index e26bf5cb..70d4c83c 100644 --- a/dojo_plugin/api/v1/dojo.py +++ b/dojo_plugin/api/v1/dojo.py @@ -82,13 +82,15 @@ class PruneAwards(Resource): @dojo_admin def post(self, dojo): all_completions = set(user for user,_ in dojo.completions()) + print(all_completions) num_pruned = 0 for award in Emojis.query.where(Emojis.category==dojo.reference_id): if award.user not in all_completions: + print(award) num_pruned += 1 db.session.delete(award) db.session.commit() - return {"success": True} + return {"success": True, "pruned_awards": num_pruned} @dojo_namespace.route("//promote-admin") class PromoteAdmin(Resource):