Skip to content

Commit a8a7381

Browse files
committed
fix registration
1 parent 5fe2e66 commit a8a7381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox_custom_objects/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def wrapped_post_through_setup(self, cls):
590590
TM.post_through_setup = original_post_through_setup
591591

592592
# Register the main model with Django's app registry
593-
if model_name in app_models:
593+
if model_name in apps.all_models[APP_LABEL]:
594594
# Remove the existing model from all_models before registering the new one
595595
del apps.all_models[APP_LABEL][model_name]
596596

0 commit comments

Comments
 (0)