Browse Source

Closes #16058: Fix circular import involving register_model_view() (#19076)

Jeremy Stretch 10 months ago
parent
commit
092769da7e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      netbox/netbox/models/features.py

+ 2 - 1
netbox/netbox/models/features.py

@@ -20,7 +20,6 @@ from netbox.registry import registry
 from netbox.signals import post_clean
 from netbox.signals import post_clean
 from utilities.json import CustomFieldJSONEncoder
 from utilities.json import CustomFieldJSONEncoder
 from utilities.serialization import serialize_object
 from utilities.serialization import serialize_object
-from utilities.views import register_model_view
 
 
 __all__ = (
 __all__ = (
     'BookmarksMixin',
     'BookmarksMixin',
@@ -640,6 +639,8 @@ def register_models(*models):
 
 
     register_model() should be called for each relevant model under the ready() of an app's AppConfig class.
     register_model() should be called for each relevant model under the ready() of an app's AppConfig class.
     """
     """
+    from utilities.views import register_model_view
+
     for model in models:
     for model in models:
         app_label, model_name = model._meta.label_lower.split('.')
         app_label, model_name = model._meta.label_lower.split('.')