diff --git a/InvenTree/plugin/builtin/integration/mixins.py b/InvenTree/plugin/builtin/integration/mixins.py index cd757edc9f..5390740c03 100644 --- a/InvenTree/plugin/builtin/integration/mixins.py +++ b/InvenTree/plugin/builtin/integration/mixins.py @@ -154,7 +154,7 @@ class ScheduleMixin: minutes=task.get('minutes', None), repeats=task.get('repeats', -1), ) - except OperationalError: + except (ProgrammingError, OperationalError): # Database might not yet be ready pass @@ -175,7 +175,7 @@ class ScheduleMixin: scheduled_task.delete() except Schedule.DoesNotExist: pass - except OperationalError: + except (ProgrammingError, OperationalError): # Database might not yet be ready pass diff --git a/InvenTree/plugin/registry.py b/InvenTree/plugin/registry.py index 37196d7e54..c6dbe959b8 100644 --- a/InvenTree/plugin/registry.py +++ b/InvenTree/plugin/registry.py @@ -336,7 +336,7 @@ class PluginsRegistry: if deleted_count > 0: logger.info(f"Removed {deleted_count} old scheduled tasks") - except OperationalError: + except (ProgrammingError, OperationalError): # Database might not yet be ready pass