mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 11:41:35 +01:00
[kemonoparty:favorite] fix exception when sorting None (#5692)
This commit is contained in:
parent
7614bc458e
commit
2cab87c5b6
@ -518,7 +518,8 @@ class KemonopartyFavoriteExtractor(KemonopartyExtractor):
|
||||
|
||||
if not sort:
|
||||
sort = "updated"
|
||||
users.sort(key=lambda x: x[sort], reverse=(order == "desc"))
|
||||
users.sort(key=lambda x: x[sort] or util.NONE,
|
||||
reverse=(order == "desc"))
|
||||
|
||||
for user in users:
|
||||
user["_extractor"] = KemonopartyUserExtractor
|
||||
@ -532,7 +533,8 @@ class KemonopartyFavoriteExtractor(KemonopartyExtractor):
|
||||
|
||||
if not sort:
|
||||
sort = "faved_seq"
|
||||
posts.sort(key=lambda x: x[sort], reverse=(order == "desc"))
|
||||
posts.sort(key=lambda x: x[sort] or util.NONE,
|
||||
reverse=(order == "desc"))
|
||||
|
||||
for post in posts:
|
||||
post["_extractor"] = KemonopartyPostExtractor
|
||||
|
Loading…
x
Reference in New Issue
Block a user