From 827aab6ffbb409cb9bb14bb193fd468eff35f83e Mon Sep 17 00:00:00 2001 From: Iain Learmonth Date: Mon, 16 May 2022 14:06:07 +0100 Subject: [PATCH] automate: add flash activity to db session --- app/cli/automate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/cli/automate.py b/app/cli/automate.py index a21d22b..8c9d836 100644 --- a/app/cli/automate.py +++ b/app/cli/automate.py @@ -114,6 +114,7 @@ def run_job(job_cls: Type[BaseAutomation], *, activity_type="automation", text=f"FLASH! Automation Failure: {automation.short_name}. See logs for details." ) + db.session.add(activity) activity.notify() # Notify before commit because the failure occurred even if we can't commit. automation.last_run = datetime.datetime.utcnow() db.session.commit()