From 2ee3b62a0f17d1d8a7afce9a4ff5ac0673d182c5 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 8 Dec 2023 08:13:04 -0800 Subject: [PATCH 1/2] 14424 remove ChangeLoggedModel from StagedChange --- ...04_remove_stagedchange_created_and_more.py | 20 +++++++++++++++++++ netbox/extras/models/staging.py | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 netbox/extras/migrations/0104_remove_stagedchange_created_and_more.py diff --git a/netbox/extras/migrations/0104_remove_stagedchange_created_and_more.py b/netbox/extras/migrations/0104_remove_stagedchange_created_and_more.py new file mode 100644 index 00000000000..df962bbb87c --- /dev/null +++ b/netbox/extras/migrations/0104_remove_stagedchange_created_and_more.py @@ -0,0 +1,20 @@ +# Generated by Django 4.2.5 on 2023-12-08 16:03 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ('extras', '0103_gfk_indexes'), + ] + + operations = [ + migrations.RemoveField( + model_name='stagedchange', + name='created', + ), + migrations.RemoveField( + model_name='stagedchange', + name='last_updated', + ), + ] diff --git a/netbox/extras/models/staging.py b/netbox/extras/models/staging.py index b2da7a6229a..f15d8d47077 100644 --- a/netbox/extras/models/staging.py +++ b/netbox/extras/models/staging.py @@ -7,6 +7,7 @@ from extras.choices import ChangeActionChoices from netbox.models import ChangeLoggedModel +from netbox.models.features import * from utilities.utils import deserialize_object __all__ = ( @@ -54,7 +55,7 @@ def merge(self): self.staged_changes.all().delete() -class StagedChange(ChangeLoggedModel): +class StagedChange(CustomValidationMixin, EventRulesMixin, models.Model): """ The prepared creation, modification, or deletion of an object to be applied to the active database at a future point. From acfa33116662796cf9bd1ad29d4bab9c81403133 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 8 Dec 2023 14:28:05 -0800 Subject: [PATCH 2/2] 14424 rename migration --- ...ted_and_more.py => 0104_stagedchange_remove_change_logging.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename netbox/extras/migrations/{0104_remove_stagedchange_created_and_more.py => 0104_stagedchange_remove_change_logging.py} (100%) diff --git a/netbox/extras/migrations/0104_remove_stagedchange_created_and_more.py b/netbox/extras/migrations/0104_stagedchange_remove_change_logging.py similarity index 100% rename from netbox/extras/migrations/0104_remove_stagedchange_created_and_more.py rename to netbox/extras/migrations/0104_stagedchange_remove_change_logging.py