1
0

More robust UserInfo

This commit is contained in:
Jon Michael Aanes 2024-10-01 13:23:22 +02:00
parent c98946cacb
commit ce10f41330
3 changed files with 6 additions and 5 deletions

View File

@ -16,7 +16,7 @@ def main():
with tempfile.TemporaryDirectory(prefix='favro_sync_') as tmpdirname:
session = requests_cache.CachedSession(
tmpdirname + '/http-cache.sqlite',
expire_after=10,
expire_after=300,
)
client = FavroClient(

View File

@ -57,10 +57,10 @@ class UserInfo:
@staticmethod
def from_json(json: dict[str, Any]) -> 'UserInfo':
return UserInfo(
UserId(json['userId']),
json['name'],
json['email'],
json['organizationRole'],
map_opt(UserId, json.get('userId')),
json.get('name'),
json.get('email'),
json.get('organizationRole'),
)

View File

@ -201,6 +201,7 @@ class FavroFuse(fuse.Fuse):
seq_id=card.seq_id.raw_id,
),
todo_list_completed = card.todo_list_completed,
archived=card.archived,
start_date= card.start_date,
due_date= card.due_date,
)