From 72845c9a6867d3f083535f97ccb7e85162b16543 Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Sun, 14 Sep 2025 12:07:57 -0500 Subject: [PATCH] Renumber mgiration --- ...configrevision_active.py => 0019_configrevision_active.py} | 2 +- netbox/core/models/config.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename netbox/core/migrations/{0016_configrevision_active.py => 0019_configrevision_active.py} (95%) 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