TDL 22684/sync all form ids and handle no questions error#73
TDL 22684/sync all form ids and handle no questions error#73kethan1122 merged 6 commits intomasterfrom
Conversation
dsprayberry
left a comment
There was a problem hiding this comment.
We can remove the NoFormsProvidedError class since it will no longer be used.
We should probably move api_forms into the if not config.get('forms') to ensure we're not making extraneous calls when we already have user provided forms.
Can we also add unit test assertions around fetching forms (via api_forms) when none are provided in addition to raising the log warning?
| """Validate the form ids passed in the config""" | ||
| form_stream = Forms() | ||
|
|
||
| api_forms = {form.get('id') for res in form_stream.get_forms(client) for form in res if form} |
There was a problem hiding this comment.
This should probably be within the "if not" block on 24 to make sure we're not getting all forms even when a user has provided forms.
There was a problem hiding this comment.
This is also needed to validate the form ids configured by the user, so keeping it as it is
There was a problem hiding this comment.
Agree with @kethan1122 ; this step is used to verify that the form id's provided are valid ids. It now is also used to capture all forms from the account.
|
Thanks @kethan1122 and @dsprayberry! |
Description of change
Handles/Fixes:
Manual QA steps
formsfield in config and noticed data being extracted for all the forms.formsfield value as""andNoneand noticed data being extracted for all the forms.form_idin config and noticed data being extracted only for that single form id.form_idswhich are comma separated in config and noticed data being extracted only for those form IDsThere are no questions associated with formwithout failing.Risks
formsfield configured. This changes will not have any impact on themRollback steps