Skip to content

Commit

Permalink
fix: sort documents by title before upload time
Browse files Browse the repository at this point in the history
  • Loading branch information
liblaf committed Oct 16, 2023
1 parent 01f6ab6 commit 80c8bfd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions thu_learn_downloader/client/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def documents(self) -> Sequence[Document]:
params={"wlkcid": self.id, "size": MAX_SIZE},
).json()["object"]
]
documents.sort(key=lambda document: document.title)
documents.sort(key=lambda document: document.upload_time)
return documents

Expand Down

0 comments on commit 80c8bfd

Please sign in to comment.