Closed
Description
Description
Sign sync is failing because new attributes are present under the "settings" section of the JSON response for Sign accounts.
The UST error received is :
TypeError: __init__() missing 1 required positional argument: 'inherited'
2022-06-21 07:49:32 14656 ERROR asyncio - Task exception was never retrieved
future: <Task finished name='Task-11667' coro=<SignClient._get_user_groups() done, defined at sign_client\client.py:277> exception=TypeError("__init__() missing 1 required positional argument: 'inherited'")>
Traceback (most recent call last):
File "sign_client\client.py", line 284, in _get_user_groups
File "sign_client\model.py", line 197, in from_dict
File "sign_client\model.py", line 197, in <listcomp>
File "sign_client\model.py", line 185, in from_dict
File "sign_client\model.py", line 166, in from_dict
File "sign_client\model.py", line 166, in <dictcomp>
File "sign_client\model.py", line 153, in from_dict
Steps to reproduce
Getting a particular Sign user info, contains this part:
"settings": {
"userCanSend": {
"value": false,
"inherited": true
},
"libaryDocumentCreationVisible": {
"value": true,
"inherited": true
},
"sendRestrictedToWorkflows": {
"value": false
},
"userManagedWorkflowsEnabled": {
"value": false
},
"allowedToShareUserCreatedWorkflows": {
"value": false
}
Cause can be found in the models.py, where 2 defaults are expected, when in fact inherited
is optional in some cases:
@dataclass
class BooleanSettingsInfo:
value: bool
inherited: bool
@classmethod
def from_dict(cls, dct):
return cls(**dct)
Expected behavior
UST should deal if inherited
is present or not in the JSON.
Even if this part is dealt, the next problem will appear for the class SettingsInfo
, because it has 3 default values expected and you can observe from the settings
, there are now 5 statements.
This is how the defaults are set:
class SettingsInfo:
libaryDocumentCreationVisible: BooleanSettingsInfo = None
sendRestrictedToWorkflows: BooleanSettingsInfo = None
userCanSend: BooleanSettingsInfo = None
Environment
- UST version: 2.7.3
- OS type and version: all
- Any other relevant info:
Metadata
Metadata
Assignees
Labels
No labels