Skip to content

Commit

Permalink
allow sorting endpoints by ID (#11228)
Browse files Browse the repository at this point in the history
also mini-fix to allow paginating over endpoints if any is broken (missing product)
  • Loading branch information
fopina authored Nov 22, 2024
1 parent 70f626f commit eb650e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dojo/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2393,6 +2393,7 @@ class EndpointFilterHelper(FilterSet):
fields=(
("product", "product"),
("host", "host"),
("id", "id"),
),
)

Expand Down Expand Up @@ -2630,6 +2631,7 @@ class ApiEndpointFilter(DojoFilter):
fields=(
("host", "host"),
("product", "product"),
("id", "id"),
),
)

Expand Down
2 changes: 1 addition & 1 deletion dojo/templates/dojo/endpoints.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h3 class="has-filters">
{% endif %}
{% include "dojo/snippets/tags.html" with tags=e.tags.all %}
</td>
{% if not product_tab %}
{% if not product_tab and e.product %}
<td>
<a href="{% url 'view_product' e.product.id %}">{{ e.product }}</a>
{% include "dojo/snippets/tags.html" with tags=e.product.tags.all %}
Expand Down

0 comments on commit eb650e0

Please sign in to comment.