Skip to content

Commit

Permalink
Sort for permit type
Browse files Browse the repository at this point in the history
  • Loading branch information
remyvdwereld committed Oct 2, 2023
1 parent 29d89ba commit 90485fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/apps/permits/api_queries_decos_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,12 @@ def get_decos_entry_by_bag_id(self, bag_id, dt):
# Extend the original permits list with new items
permits.extend(new_permits)

# Sort the list based on the "permit_type" key
sorted_permits = sorted(permits, key=lambda x: x["permit_type"])

response.update(
{
"permits": permits,
"permits": sorted_permits,
"decos_folders": response_decos_folder,
}
)
Expand Down

0 comments on commit 90485fc

Please sign in to comment.