Skip to content

Commit 1b45e43

Browse files
committed
fix code from review
Signed-off-by: Aayush Kumar <[email protected]>
1 parent d8b151a commit 1b45e43

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

scanpipe/templates/scanpipe/panels/resource_table_panel.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,18 @@
3434
</tr>
3535
</thead>
3636
<tbody>
37-
{% if parent_path is not None %}
37+
{% if parent_path %}
3838
<tr class="expand-in-tree is-clickable"
39-
data-path="{{ parent_path|default_if_none:'' }}"
39+
data-path="{{ parent_path }}"
4040
hx-get="{% url 'codebase_resource_table' project.slug %}{% if parent_path %}?path={{ parent_path }}{% endif %}"
4141
hx-target="#right-pane"
4242
hx-push-url="{% url 'codebase_resource_tree' project.slug %}{% if parent_path %}?path={{ parent_path }}{% endif %}">
43-
<td class="is-flex is-align-items-center break-all" style="min-width: 100px;">
43+
<td class="is-align-items-center break-all" colspan="5" style="min-width: 100px;">
4444
<span class="icon is-small mr-2">
4545
<i class="fas fa-folder"></i>
4646
</span>
4747
<span class="has-text-weight-medium">..</span>
4848
</td>
49-
<td></td>
50-
<td></td>
51-
<td></td>
52-
<td></td>
5349
</tr>
5450
{% endif %}
5551
{% for resource in resources %}

scanpipe/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,5 @@ def get_context_data(self, **kwargs):
28482848
if path and "/" in path:
28492849
parent_segments = path.rstrip("/").split("/")[:-1]
28502850
context["parent_path"] = "/".join(parent_segments)
2851-
else:
2852-
context["parent_path"] = None
28532851

28542852
return context

0 commit comments

Comments
 (0)