diff --git a/netbox/core/migrations/0016_configrevision_active.py b/netbox/core/migrations/0019_configrevision_active.py similarity index 95% rename from netbox/core/migrations/0016_configrevision_active.py rename to netbox/core/migrations/0019_configrevision_active.py index af04202ed..5bf25ed5c 100644 --- a/netbox/core/migrations/0016_configrevision_active.py +++ b/netbox/core/migrations/0019_configrevision_active.py @@ -27,7 +27,7 @@ def get_active(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('core', '0015_remove_redundant_indexes'), + ('core', '0018_concrete_objecttype'), ] operations = [ diff --git a/netbox/core/models/config.py b/netbox/core/models/config.py index d97c6e53c..2559f7eca 100644 --- a/netbox/core/models/config.py +++ b/netbox/core/models/config.py @@ -71,8 +71,8 @@ class ConfigRevision(models.Model): cache.set('config_version', self.pk, None) # Set all instances of ConfigRevision to false and set this instance to true - self.objects.all().update(active=True) - self.objects.get(pk=self.pk).update(active=True) + ConfigRevision.objects.all().update(active=True) + ConfigRevision.objects.get(pk=self.pk).update(active=True) activate.alters_data = True