You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems from the code (and the API itself, see "filtering" section) that the intent was to expose pk in place of the internal id, but we are getting both. This is because GeneResource automatically picks up all of the fields from the Gene model backing it and Gene extends model.Model, which includes an auto-generated id.
This is a minor issue, but it does create a bit of confusion when using the API as to which field should be used as an identifier.
"""
The text was updated successfully, but these errors were encountered:
Copied from bitbucket issue #13: (priority: minor)
https://bitbucket.org/greenelab/django-genes/issues/13/api-exposes-both-id-and-pk
@mhuyck commented:
"""
The API for django-genes can be inspected via Tastypie at, e.g.:
http://hostname/api/v0/gene/schema/?format=json
When I do this for the installation we have on
adage-server
, I get the following:It seems from the code (and the API itself, see
"filtering"
section) that the intent was to exposepk
in place of the internalid
, but we are getting both. This is becauseGeneResource
automatically picks up all of the fields from theGene
model backing it andGene
extendsmodel.Model
, which includes an auto-generatedid
.This is a minor issue, but it does create a bit of confusion when using the API as to which field should be used as an identifier.
"""
The text was updated successfully, but these errors were encountered: