Skip to content

Commit

Permalink
frontend: run the check for anitya updates script under app context
Browse files Browse the repository at this point in the history
Fix fedora-copr#3056

We are seeing the following error in the logs:

    RuntimeError: Working outside of application context.
    This typically means that you attempted to use functionality that needed
    the current application. To solve this, set up an application context
    with app.app_context(). See the documentation for more information.
  • Loading branch information
FrostyX committed Mar 7, 2024
1 parent 5bb2250 commit 5a4800e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def main():

if __name__ == '__main__':
try:
main()
with app.app_context():
main()
except Exception as e:
log.exception(str(e))

0 comments on commit 5a4800e

Please sign in to comment.