Skip to content

Commit

Permalink
Merge pull request #2002 from uwcirg/hotfix/biopsy-wo-issued
Browse files Browse the repository at this point in the history
Fix TN-947 - don't include observations with null issued when looking…
  • Loading branch information
pbugni authored Apr 4, 2018
2 parents e42fc78 + c374af9 commit edc1a42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion portal/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ def fetch_datetime_for_concept(self, codeable_concept):
codeable_concept = codeable_concept.add_if_not_found()
matching_observations = [
obs for obs in self.observations if
obs.codeable_concept_id == codeable_concept.id]
obs.codeable_concept_id == codeable_concept.id and
obs.issued is not None]
if not matching_observations:
return None
newest = max(o.issued for o in matching_observations
Expand Down

0 comments on commit edc1a42

Please sign in to comment.