From 2e82f94b9d6310413acd415845b37778bebdacaf Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Mon, 14 Feb 2022 13:58:14 -0600 Subject: [PATCH] fix context issue --- app/moderation.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/app/moderation.py b/app/moderation.py index 529c75b..faa6042 100644 --- a/app/moderation.py +++ b/app/moderation.py @@ -128,23 +128,24 @@ def get_pets(status="all"): @scheduler.task("cron", id="pet_name_maintenance", minute=0, timezone="UTC") def pet_name_maintenance(): - # associate pet names to characters - unassociated_pets = PetNames.query.filter(PetNames.owner_id == None).all() - if unassociated_pets: - for pet in unassociated_pets: - owner = CharacterXML.query.filter(CharacterXML.xml_data.like(f"%