Skip to content

Commit e46095f

Browse files
Dirk Moorsauvipy
authored andcommitted
Added extra except clause to TryRemoveIndex
1 parent 88d771a commit e46095f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

django_celery_results/migrations/0010_remove_duplicate_indices.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ def database_forwards(self, *args, **kwargs):
2121
super().database_forwards(*args, **kwargs)
2222
except DatabaseError:
2323
pass
24+
except Exception:
25+
# Not all DB engines throw DatabaseError when the
26+
# index does not exist.
27+
pass
2428

2529
def database_backwards(self, *args, **kwargs):
2630
"""Don't re-add the index when reverting this migration"""

0 commit comments

Comments
 (0)