Chemical-Curation / chemcurator_django

Backend services for chemical curation
https://api.chemreg.epa.gov
MIT License
1 stars 0 forks source link

description, privateQcNotes, and publicQcNotes should not be required on substances #258

Closed cmgrulke closed 3 years ago

cmgrulke commented 3 years ago

Describe the bug When I post a substance, if it is missing the description, privateQcNote, or publicQcNote, the POST is rejected. These were not listed as required fields in issue #90, so should not be required in a POST.

To Reproduce POST the body below to the {{baseUrl]]/substances endpoint { "data": { "type": "substance", "attributes": { "casrn": "7732-19-6", "display_name": "Waters", "preferred_name": "waterss" }, "relationships": { "qcLevel": { "data": { "id": 1, "type": "qcLevel" } }, "source": { "data": { "id": 1, "type": "source" } }, "substanceType": { "data": { "id": 1, "type": "substanceType" } } } } } The errors listed include requiring of the description, privateQcNotes, and publicQcNotes

Expected behavior The POST to be successful (provided the qcLevel, source, and substance types exists and the names and casrns have no conflicts)