mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 21:48:16 -06:00
Remove obsolete is_valid() method
This commit is contained in:
parent
8e2e4979b0
commit
f3ef004e04
@ -362,13 +362,6 @@ class BaseScript:
|
|||||||
def source(self):
|
def source(self):
|
||||||
return inspect.getsource(self.__class__)
|
return inspect.getsource(self.__class__)
|
||||||
|
|
||||||
@property
|
|
||||||
def is_valid(self):
|
|
||||||
"""
|
|
||||||
Indicates whether the report can be run.
|
|
||||||
"""
|
|
||||||
return bool(self.test_methods)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_vars(cls):
|
def _get_vars(cls):
|
||||||
vars = {}
|
vars = {}
|
||||||
|
@ -62,18 +62,10 @@
|
|||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td class="text-muted">{% trans "Never" %}</td>
|
<td class="text-muted">{% trans "Never" %}</td>
|
||||||
<td>
|
<td>{{ ''|placeholder }}</td>
|
||||||
{% if script.is_valid %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% else %}
|
|
||||||
<span class="badge text-bg-danger" title="{% trans "Script has no methods" %}">
|
|
||||||
{% trans "Invalid" %}
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>
|
<td>
|
||||||
{% if perms.extras.run_script and script.is_valid %}
|
{% if perms.extras.run_script %}
|
||||||
<div class="float-end d-print-none">
|
<div class="float-end d-print-none">
|
||||||
<form action="{% url 'extras:script' module=script.module name=script.class_name %}" method="post">
|
<form action="{% url 'extras:script' module=script.module name=script.class_name %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
Loading…
Reference in New Issue
Block a user