From 53dc7d6cb26b1db3775b9d6dad2fdac4358c8dc9 Mon Sep 17 00:00:00 2001 From: John Tordoff <> Date: Tue, 7 Mar 2023 13:19:40 -0500 Subject: [PATCH] fix migrations again --- osf/migrations/0013_eradicate_quickfiles.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/osf/migrations/0013_eradicate_quickfiles.py b/osf/migrations/0013_eradicate_quickfiles.py index 1cfc54132266..f9c257667c08 100644 --- a/osf/migrations/0013_eradicate_quickfiles.py +++ b/osf/migrations/0013_eradicate_quickfiles.py @@ -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):