fix a bug

This commit is contained in:
xtaodada 2022-08-02 21:42:50 +08:00
parent 8bc08d18d3
commit 4d43438a4d
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -13,7 +13,7 @@ async def get_news() -> List[New]:
return [] return []
data = data.json() data = data.json()
data = [New(**i) for i in data.get("result", [])] data = [New(**i) for i in data.get("result", [])]
update_time = 0 update_time = time
for new in data: for new in data:
if new.publish_time > update_time: if new.publish_time > update_time:
update_time = new.publish_time update_time = new.publish_time