Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions netbox_custom_objects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,14 @@ def get_list_url(self):
@classmethod
def _get_viewname(cls, action=None, rest_api=False):
if rest_api:
return f"plugins-api:netbox_custom_objects:api:customobject_{action}"
return f"plugins-api:netbox_custom_objects-api:customobject-{action}"
return f"plugins:netbox_custom_objects:customobject_{action}"

@classmethod
def _get_action_url(cls, action=None, rest_api=False, kwargs=None):
if kwargs:
kwargs["custom_object_type"] = cls.custom_object_type.name.lower()
if kwargs is None:
kwargs = {}
kwargs["custom_object_type"] = cls.custom_object_type.name.lower()
return reverse(cls._get_viewname(action, rest_api), kwargs=kwargs)


Expand Down