We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d28b7b commit 1cbf646Copy full SHA for 1cbf646
1 file changed
src/core/model_utils.py
@@ -29,6 +29,7 @@
29
connection,
30
IntegrityError,
31
models,
32
+ OperationalError,
33
ProgrammingError,
34
transaction,
35
)
@@ -692,7 +693,7 @@ def default_press():
692
693
try:
694
Press = apps.get_model("press", "Press")
695
return Press.objects.first()
- except ProgrammingError:
696
+ except (ProgrammingError, OperationalError):
697
# Initial migration will attempt to call this,
698
# even when no EditorialGroups are created
699
return
0 commit comments