We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33552ac commit 51b9defCopy full SHA for 51b9def
core/concepts/custom_validators.py
@@ -170,7 +170,10 @@ def no_more_than_one_short_name_per_locale(concept):
170
short_names_per_locale[name.locale] = True
171
172
def concept_class_should_be_valid_attribute(self, concept):
173
- if concept.concept_class not in self.reference_values['Classes']:
+ if not concept.concept_class or (
174
+ concept.concept_class not in self.reference_values['Classes'] and
175
+ concept.concept_class.replace('-', ' ') not in self.reference_values['Classes']
176
+ ):
177
raise ValidationError({'concept_class': [OPENMRS_CONCEPT_CLASS]})
178
179
def data_type_should_be_valid_attribute(self, concept):
0 commit comments