Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: various fixes #738

Merged
merged 2 commits into from
Sep 23, 2020
Merged

fix: various fixes #738

merged 2 commits into from
Sep 23, 2020

Conversation

dodumosu
Copy link
Collaborator

this pull request attempts to address:

  • nditech/apollo-issues#89, where the "recent phone" was inaccurate
  • nditech/apollo-issues#90, where the "db phone" and "recent phone" were to be updated
  • nditech/apollo-issues#91, where a specific order for participant phone numbers was to be set
  • nditech/apollo-issues#92, where the "db phone" and "recent phone" for location submission export was to match the observer export

@dodumosu dodumosu requested a review from takinbo September 18, 2020 00:02
sorted(submission.participant.phone_contacts, key=lambda p: p.updated, reverse=True)[0].number # noqa
if submission.participant and
submission.participant.phone_contacts else '',
submission.last_phone_number,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should store safe values if the submission does not have a value for last_phone_number.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the property defaults to None, which is output as an empty string

sib.participant.phone_contacts[0].number
if sib.participant and sib.participant.phone_contacts
else '',
sib.last_phone_number,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set a safe value in case a value for last_phone_number is not available.

this pull request attempts to address:

- nditech/apollo-issues#89, where the "recent phone" was inaccurate
- nditech/apollo-issues#90, where the "db phone" and "recent phone" were to be updated
- nditech/apollo-issues#91, where a specific order for participant phone numbers was to be set
- nditech/apollo-issues#92, where the "db phone" and "recent phone" for location submission export was to match the observer export
Copy link
Collaborator

@takinbo takinbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@takinbo takinbo merged commit 27e9412 into nditech:develop Sep 23, 2020
@dodumosu dodumosu deleted the participant-fixes branch November 10, 2020 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants