mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 12:08:43 -06:00
Renumber mgiration
This commit is contained in:
@@ -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 = [
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user