Closed scaduto closed 4 years ago
the identifier
and identifier_label
fields need to be required in this model, the blank
and null
args are confusing to model fields but for me after about the 47th time reading them it finally sank in.
In [47]: RecordIdentifier.objects.create(record=r, identifier_type=it)
Out[47]: <RecordIdentifier: RecordIdentifier object (1)>
the above will be rejected in the serializer's validation process! and will result in an error
{
"detail": "This field is required.",
"status": "400",
"source": {
"pointer": "/data/attributes/identifier"
},
"code": "required"
}
Closes #177
Renamed SourceSubstanceIdentifier Model to RecordIdentifier Model and attribute source_substance to record for clarity