mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -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.
|
# fall back to using base.html.
|
||||||
if self.base_template is None:
|
if self.base_template is None:
|
||||||
self.base_template = f"{model._meta.app_label}/{model._meta.model_name}.html"
|
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', {
|
return render(request, 'extras/object_changelog.html', {
|
||||||
'object': obj,
|
'object': obj,
|
||||||
@ -368,11 +363,6 @@ class ObjectJournalView(View):
|
|||||||
# fall back to using base.html.
|
# fall back to using base.html.
|
||||||
if self.base_template is None:
|
if self.base_template is None:
|
||||||
self.base_template = f"{model._meta.app_label}/{model._meta.model_name}.html"
|
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', {
|
return render(request, 'extras/object_journal.html', {
|
||||||
'object': obj,
|
'object': obj,
|
||||||
|
@ -1018,6 +1018,7 @@ class ViewTestCases:
|
|||||||
maxDiff = None
|
maxDiff = None
|
||||||
|
|
||||||
class OrganizationalObjectViewTestCase(
|
class OrganizationalObjectViewTestCase(
|
||||||
|
GetObjectViewTestCase,
|
||||||
GetObjectChangelogViewTestCase,
|
GetObjectChangelogViewTestCase,
|
||||||
CreateObjectViewTestCase,
|
CreateObjectViewTestCase,
|
||||||
EditObjectViewTestCase,
|
EditObjectViewTestCase,
|
||||||
|
Loading…
Reference in New Issue
Block a user