Skip to content

Commit d321280

Browse files
committed
Cleanup table name resolution
1 parent 9af8381 commit d321280

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

netbox_custom_objects/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ def get_model(self, model_name, require_ready=True):
9999
)
100100

101101
from .models import CustomObjectType
102-
from .utilities import get_custom_object_type_from_content_type
103102

104-
custom_object_type_id = get_custom_object_type_from_content_type(model_name)
103+
custom_object_type_id = model_name.replace("table", "").replace("model", "")
105104

106105
try:
107106
obj = CustomObjectType.objects.get(pk=custom_object_type_id)

0 commit comments

Comments
 (0)