Chemical-Curation / chemcurator_django

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

65 substance page relationships django #247

Closed michael-barbour closed 4 years ago

michael-barbour commented 4 years ago

Django helper to close vue ticket #65

Substance Relationships endpoint needs to allow searching by both To and From substance with an "or" lookup. DRF:JA does not currently support this functionality (nor does django_filters without a custom endpoint)

This adds a filter for substance.id onto the substanceRelationships/ endpoint to allow for simultaneous searching.

This adds a test and also some seed test data to allow compound DTXCID502000009 to show all relationship types; Forward, Reverse, and Mirrored.