Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
sort by modified date
Browse files Browse the repository at this point in the history
  • Loading branch information
mytja committed Jan 22, 2024
1 parent ce737c9 commit ececdcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def get_my_notifications(response: Response, only_new: bool = False, autho
seen_notifications = []
expired_notifications = []
async with async_session() as session:
db_objects = (await session.execute(select(SharepointNotification))).all()
db_objects = (await session.execute(select(SharepointNotification).order_by(SharepointNotification.modified_on))).all()
for notification in db_objects:
notification = notification[0]
if notification.expires_on < time.time():
Expand Down

0 comments on commit ececdcc

Please sign in to comment.