More robust UserInfo
This commit is contained in:
parent
c98946cacb
commit
ce10f41330
|
@ -16,7 +16,7 @@ def main():
|
||||||
with tempfile.TemporaryDirectory(prefix='favro_sync_') as tmpdirname:
|
with tempfile.TemporaryDirectory(prefix='favro_sync_') as tmpdirname:
|
||||||
session = requests_cache.CachedSession(
|
session = requests_cache.CachedSession(
|
||||||
tmpdirname + '/http-cache.sqlite',
|
tmpdirname + '/http-cache.sqlite',
|
||||||
expire_after=10,
|
expire_after=300,
|
||||||
)
|
)
|
||||||
|
|
||||||
client = FavroClient(
|
client = FavroClient(
|
||||||
|
|
|
@ -57,10 +57,10 @@ class UserInfo:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_json(json: dict[str, Any]) -> 'UserInfo':
|
def from_json(json: dict[str, Any]) -> 'UserInfo':
|
||||||
return UserInfo(
|
return UserInfo(
|
||||||
UserId(json['userId']),
|
map_opt(UserId, json.get('userId')),
|
||||||
json['name'],
|
json.get('name'),
|
||||||
json['email'],
|
json.get('email'),
|
||||||
json['organizationRole'],
|
json.get('organizationRole'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -201,6 +201,7 @@ class FavroFuse(fuse.Fuse):
|
||||||
seq_id=card.seq_id.raw_id,
|
seq_id=card.seq_id.raw_id,
|
||||||
),
|
),
|
||||||
todo_list_completed = card.todo_list_completed,
|
todo_list_completed = card.todo_list_completed,
|
||||||
|
archived=card.archived,
|
||||||
start_date= card.start_date,
|
start_date= card.start_date,
|
||||||
due_date= card.due_date,
|
due_date= card.due_date,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user