Skip to content

Commit 1fb360f

Browse files
authored
fix choices.display - last element issue (#6)
1 parent 82d1713 commit 1fb360f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
**2024-07-14**
4+
5+
- Fix choice.display last element issue
6+
7+
---
8+
39
**2024-07-03**
410

511
- Now package is working fine :) Thanks to [Bahattin][bahattincinic]!

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ rake upload:test # Upload package to test distro
275275

276276
## Change Log
277277

278+
**2024-07-14**
279+
280+
- Fix choice.display last element issue
281+
282+
---
283+
278284
**2024-07-03**
279285

280286
- Now package is working fine :) Thanks to [Bahattin][bahattincinic]!

src/dalf/templates/admin/filter/django_admin_list_filter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% with params=choices|last %}
1010
<select class="django-admin-list-filter" name="{{ params.field_name }}" data-is-choices-filter="{{ params.is_choices_filter }}">
1111
{% for choice in choices %}
12-
<option value="{{ choice.query_string|iriencode }}"{% if choice.selected %} selected{% endif %}>{{ choice.display }}</option>
12+
{% if choice.display %}<option value="{{ choice.query_string|iriencode }}"{% if choice.selected %} selected{% endif %}>{{ choice.display }}</option>{% endif %}
1313
{% endfor %}
1414
</select>
1515
{% endwith %}

0 commit comments

Comments
 (0)