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 symptomatic_international_traveller crash #1175

Merged

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Feb 3, 2023

Proposed Changes

  • On the ICMR Specimen Referral, the api call to .../icmr_sample errors out with the following error:
TypeError at /api/v1/patient/7c1d2896-8ebf-45c7-b507-98fcedd48ef3/test_sample/5aef7a72-5e2c-4a0f-b689-747aae8b0dce/icmr_sample/
object of type 'NoneType' has no len()

This is because we are calling len(self.patient.countries_travelled) when self.patient.countries_travelled is None. This PR addresses this issue by adding a check for self.patient.countries_travelled to be defined before calling len on it.

@coronasafe/code-reviewers

@Ashesh3 Ashesh3 requested a review from a team as a code owner February 3, 2023 09:23
@sonarcloud
Copy link

sonarcloud bot commented Feb 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vigneshhari vigneshhari merged commit 84879ff into coronasafe:master Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants