Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object goo_attrs_to_load is not working as excepted #46

Open
syphax-bouazzouni opened this issue Sep 14, 2023 · 1 comment
Open

Object goo_attrs_to_load is not working as excepted #46

syphax-bouazzouni opened this issue Sep 14, 2023 · 1 comment
Assignees
Labels

Comments

@syphax-bouazzouni
Copy link

syphax-bouazzouni commented Sep 14, 2023

Doing OntologySubmission.goo_attrs_to_load([:contact, :ontology])

Should return all the attributes of contact and ontology that are needed to be loaded in a request

{
  :contact=>[:name, :email],
  :ontology=>[:administeredBy, :acronym, :name, :summaryOnly, :flat, :ontologyType, :group, :hasDomain, 
                        :viewingRestriction, :viewOf, :views, :reviews, :notes, :projects]

}

But the returned object is

{
  :contact=>[:ontology],
  :ontology=>[:administeredBy, :acronym, :name, :summaryOnly, :flat, :ontologyType, :group, :hasDomain, :viewingRestriction, :viewOf, :views, :reviews, :notes, :projects]

}

This function is used mostly in the API layer with the include parameter, when we do for example /submissions?include=contact or /submissions?include=all, this function goo_attrs_to_load is called.

Having the function not working, causes this sort of issue ontoportal-lirmm/ontologies_api#22, where do fetch all the asked attributes correctly.
All of the hot fixed and ad-hoc code were made in the API layer to handle this, but this function was never fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant