Skip to content

Commit

Permalink
fix migrations again
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Mar 7, 2023
1 parent b17cbf9 commit 53dc7d6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions osf/migrations/0013_eradicate_quickfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@


class DeleteModelIfExist(migrations.DeleteModel):
"""T
"""
If the model isn't there, ignore it.
"""

def state_forwards(self, app_label, state):
def database_forwards(self, app_label, state):
try:
state.models[app_label, self.name_lower]
except KeyError:
except LookupError:
return

state.remove_model(app_label, self.name_lower)
return super().database_forwards(self, app_label, state)


class Migration(migrations.Migration):
Expand Down

0 comments on commit 53dc7d6

Please sign in to comment.