1
0
mirror of https://github.com/etesync/server synced 2024-11-22 08:48:07 +00:00

Fix type error.

This commit is contained in:
Tom Hacohen 2020-12-27 15:26:36 +02:00
parent 6f543751a6
commit df855897f8

View File

@ -38,7 +38,7 @@ def get_queryset_stoken(queryset: list) -> t.Optional[Stoken]:
for row in queryset:
rowmaxid = getattr(row, "max_stoken") or -1
maxid = max(maxid, rowmaxid)
new_stoken = (maxid >= 0) and Stoken.objects.get(id=maxid)
new_stoken = Stoken.objects.get(id=maxid) if (maxid >= 0) else None
return new_stoken or None