Change ordering to descending

This commit is contained in:
Rachid Mrad 2024-04-30 22:47:50 -04:00
parent 947e476a71
commit d9faf7478a
No known key found for this signature in database
3 changed files with 3 additions and 9 deletions

View file

@ -1,6 +1,5 @@
{% extends "admin/fieldset.html" %}
{% load static url_helpers %}
{% load custom_filters %}
{% comment %}
This is using a custom implementation fieldset.html (see admin/fieldset.html)
@ -81,7 +80,7 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
</tr>
</thead>
<tbody>
{% for log_entry in original_object.history.all|reverse_list %}
{% for log_entry in original_object.history.all %}
{% for key, value in log_entry.changes_display_dict.items %}
{% if key == "status" %}
<tr>

View file

@ -67,8 +67,3 @@ def get_organization_long_name(generic_org_type):
@register.filter(name="has_permission")
def has_permission(user, permission):
return user.has_perm(permission)
@register.filter(name="reverse_list")
def reverse_list(value):
return reversed(value)

View file

@ -961,11 +961,11 @@ class TestDomainRequestAdmin(MockEppLib):
# Define the expected sequence of status changes
expected_status_changes = [
"<td>Started</td>",
"<td>Submitted</td>",
"<td>In review</td>",
"<td>Action needed</td>",
"<td>In review</td>",
"<td>Submitted</td>",
"<td>Started</td>",
]
# Test for the order of status changes