Skip to content

Commit 2714268

Browse files
committed
Do not display the edit tag link for manually uploaded inputs #1524
Signed-off-by: tdruez <[email protected]>
1 parent 3a56367 commit 2714268

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scanpipe/templates/scanpipe/panels/project_inputs.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@
4242
{% if project.can_change_inputs and input_source.uuid %}
4343
<a class="modal-button is-grey-link is-clickable ml-1" data-target="modal-inputs-delete" aria-haspopup="true" data-url="{% url 'project_delete_input' project.slug input_source.uuid %}" data-filename="{{ input_source.filename }}" href="#"><i class="fa-regular fa-trash-can"></i></a>
4444
{% endif %}
45-
<a class="modal-button is-grey-link is-clickable ml-1" data-input-source-uuid="{{ input_source.uuid }}" data-tag-value="{{ input_source.tag }}" data-target="edit-input-tag-modal" aria-haspopup="true">
46-
<span class="icon width-1 height-1"><i class="fa-solid fa-tag"></i></span>
47-
</a>
45+
{% if input_source.uuid %}{# File added in directory manually, no InputSource object available #}
46+
<a class="modal-button is-grey-link is-clickable ml-1" data-input-source-uuid="{{ input_source.uuid }}" data-tag-value="{{ input_source.tag }}" data-target="edit-input-tag-modal" aria-haspopup="true">
47+
<span class="icon width-1 height-1"><i class="fa-solid fa-tag"></i></span>
48+
</a>
49+
{% endif %}
4850
</div>
4951
</div>
5052
{% endfor %}

0 commit comments

Comments
 (0)