mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Enable get view tests for organizational objects
This commit is contained in:
parent
2820d26a0f
commit
981e7017bb
@ -235,11 +235,6 @@ class ObjectChangeLogView(View):
|
||||
# fall back to using base.html.
|
||||
if self.base_template is None:
|
||||
self.base_template = f"{model._meta.app_label}/{model._meta.model_name}.html"
|
||||
# TODO: This can be removed once an object view has been established for every model.
|
||||
try:
|
||||
template.loader.get_template(self.base_template)
|
||||
except template.TemplateDoesNotExist:
|
||||
self.base_template = 'base.html'
|
||||
|
||||
return render(request, 'extras/object_changelog.html', {
|
||||
'object': obj,
|
||||
@ -368,11 +363,6 @@ class ObjectJournalView(View):
|
||||
# fall back to using base.html.
|
||||
if self.base_template is None:
|
||||
self.base_template = f"{model._meta.app_label}/{model._meta.model_name}.html"
|
||||
# TODO: This can be removed once an object view has been established for every model.
|
||||
try:
|
||||
template.loader.get_template(self.base_template)
|
||||
except template.TemplateDoesNotExist:
|
||||
self.base_template = 'base.html'
|
||||
|
||||
return render(request, 'extras/object_journal.html', {
|
||||
'object': obj,
|
||||
|
@ -1018,6 +1018,7 @@ class ViewTestCases:
|
||||
maxDiff = None
|
||||
|
||||
class OrganizationalObjectViewTestCase(
|
||||
GetObjectViewTestCase,
|
||||
GetObjectChangelogViewTestCase,
|
||||
CreateObjectViewTestCase,
|
||||
EditObjectViewTestCase,
|
||||
|
Loading…
Reference in New Issue
Block a user