Skip to content

Commit

Permalink
✨ (src/db_redis): sort user's requests
Browse files Browse the repository at this point in the history
For the admin page, the user's requests are now sorted by 'startdate'
field.
  • Loading branch information
ncvescera committed Jan 24, 2025
1 parent 97455c9 commit ea5b92f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def get_all_request_data(self):

all_requests_data.append(request_data)

return all_requests_data
return sorted(all_requests_data, key=lambda d: d["startdate"])

def get_user_infos(self, user: str) -> dict:

Check failure on line 225 in src/db_redis.py

View workflow job for this annotation

GitHub Actions / Pylint

src/db_redis.py#L225

Missing function or method docstring (missing-function-docstring, C0116)
self.logger.info("GETTING USER %s INFOS", user)
Expand Down

0 comments on commit ea5b92f

Please sign in to comment.