fix context issue

This commit is contained in:
Aaron Kimbre 2022-02-14 13:58:14 -06:00
parent b66d2748b4
commit 2e82f94b9d

View File

@ -128,6 +128,7 @@ def get_pets(status="all"):
@scheduler.task("cron", id="pet_name_maintenance", minute=0, timezone="UTC")
def pet_name_maintenance():
with scheduler.app.app_context():
# associate pet names to characters
unassociated_pets = PetNames.query.filter(PetNames.owner_id == None).all()
if unassociated_pets: