From f48d1c9410e44571169cb738ca6a89c13a05edf1 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 21 Mar 2024 10:38:58 -0400 Subject: [PATCH] custom_deconstruct() should not ignore TimeZoneField --- netbox/utilities/migration.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/netbox/utilities/migration.py b/netbox/utilities/migration.py index d85e9dd60..97036fc06 100644 --- a/netbox/utilities/migration.py +++ b/netbox/utilities/migration.py @@ -1,5 +1,4 @@ from django.db import models -from timezone_field import TimeZoneField from netbox.config import ConfigItem @@ -8,10 +7,6 @@ __all__ = ( ) -SKIP_FIELDS = ( - TimeZoneField, -) - EXEMPT_ATTRS = ( 'choices', 'help_text', @@ -28,9 +23,8 @@ def custom_deconstruct(field): name, path, args, kwargs = _deconstruct(field) # Remove any ignored attributes - if field.__class__ not in SKIP_FIELDS: - for attr in EXEMPT_ATTRS: - kwargs.pop(attr, None) + for attr in EXEMPT_ATTRS: + kwargs.pop(attr, None) # Ignore any field defaults which reference a ConfigItem kwargs = {