Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#45 | updated validation check
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Dec 21, 2021
1 parent bd43212 commit be65398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/collections/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def validate(self, reference):
raise ValidationError({reference.expression: [REFERENCE_ALREADY_EXISTS]})

if self.is_openmrs_schema:
if reference.concepts and reference.concepts.count() == 0:
if reference.concepts is None or reference.concepts.count() == 0:
return

concept = reference.concepts[0]
Expand Down

0 comments on commit be65398

Please sign in to comment.