Skip to content

Commit 3a5a21f

Browse files
committed
NPL-286 _get_viewname
1 parent fd30299 commit 3a5a21f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

netbox_custom_objects/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ def get_list_url(self):
133133
kwargs={"custom_object_type": self.custom_object_type.name.lower()},
134134
)
135135

136+
@classmethod
137+
def _get_viewname(cls, action=None, rest_api=False):
138+
if rest_api:
139+
return f"plugins-api:netbox_custom_objects:api:customobject_{action}"
140+
return f"plugins:netbox_custom_objects:customobject_{action}"
141+
136142
@classmethod
137143
def _get_action_url(cls, action=None, rest_api=False, kwargs=None):
138144
if kwargs:

0 commit comments

Comments
 (0)