File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -544,19 +544,20 @@ def get_model_with_serializer(self):
544
544
return model
545
545
546
546
def create_model (self ):
547
+ from netbox_custom_objects .api .serializers import get_serializer_class
547
548
# Get the model and ensure it's registered
548
549
model = self .get_model ()
549
550
550
551
# Ensure the ContentType exists and is immediately available
551
552
features = get_model_features (model )
552
- self .object_type .features = features + ['branching' ]
553
- self .object_type .public = True
554
553
self .object_type .features = features
554
+ self .object_type .public = True
555
555
self .object_type .save ()
556
556
557
557
with connection .schema_editor () as schema_editor :
558
558
schema_editor .create_model (model )
559
559
560
+ get_serializer_class (model )
560
561
self .register_custom_object_search_index (model )
561
562
562
563
def save (self , * args , ** kwargs ):
You can’t perform that action at this time.
0 commit comments