mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2025-06-30 16:49:58 +00:00
fix context issue
This commit is contained in:
parent
b66d2748b4
commit
2e82f94b9d
@ -128,6 +128,7 @@ def get_pets(status="all"):
|
|||||||
|
|
||||||
@scheduler.task("cron", id="pet_name_maintenance", minute=0, timezone="UTC")
|
@scheduler.task("cron", id="pet_name_maintenance", minute=0, timezone="UTC")
|
||||||
def pet_name_maintenance():
|
def pet_name_maintenance():
|
||||||
|
with scheduler.app.app_context():
|
||||||
# associate pet names to characters
|
# associate pet names to characters
|
||||||
unassociated_pets = PetNames.query.filter(PetNames.owner_id == None).all()
|
unassociated_pets = PetNames.query.filter(PetNames.owner_id == None).all()
|
||||||
if unassociated_pets:
|
if unassociated_pets:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user