Skip to content

Commit 8a520d4

Browse files
committed
NRL-1285 only validate doc ref fields
1 parent c11522c commit 8a520d4

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

layer/nrlf/core/parent_model.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def validate_empty_fields(cls, values):
8888
Iteratively check every field in the model for emptiness.
8989
If a field is empty, add it to the error list with its full location.
9090
"""
91-
allowed_classes = cls.get_allowed_classes()
92-
if cls.__name__ not in allowed_classes or not values:
91+
if cls.__name__ != "DocumentReference" or not values:
9392
return values
9493

9594
stack = [(None, values)]
@@ -114,32 +113,6 @@ def validate_empty_fields(cls, values):
114113

115114
return values
116115

117-
@staticmethod
118-
def get_allowed_classes():
119-
"""
120-
Return the list of allowed classes for validation.
121-
"""
122-
return [
123-
"DocumentReference",
124-
"Meta",
125-
"Narrative",
126-
"Identifier",
127-
"NRLCodeableConcept",
128-
"NRLCoding",
129-
"Reference",
130-
"DocumentReferenceRelatesTo",
131-
"CodeableConcept",
132-
"Coding",
133-
"DocumentReferenceContent",
134-
"Attachment",
135-
"NRLFormatCode",
136-
"ContentStabilityExtension",
137-
"ContentStabilityExtensionValueCodeableConcept",
138-
"ContentStabilityExtensionCoding",
139-
"DocumentReferenceContext",
140-
"Period",
141-
]
142-
143116
@staticmethod
144117
def handle_dict(current_value, path, stack, empty_fields):
145118
"""

0 commit comments

Comments
 (0)