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

issue with filtering values #28

Closed
paolap opened this issue Aug 27, 2018 · 0 comments
Closed

issue with filtering values #28

paolap opened this issue Aug 27, 2018 · 0 comments

Comments

@paolap
Copy link
Member

paolap commented Aug 27, 2018

I think this eventually will solve itself when we'll have a validation, currently if there is not value pass for a constraint or if that value is not available locally we behave in same way.
This means that if I pass a misspelled model name for example I will get as a result all the model available matching the other constraints, rather then a warning my model doesn't exist.
I think this is the source of the issue:

for key, value in six.iteritems(dataset_constraints):
if len(value) > 0:
filters.append(getattr(C6Dataset,key).ilike(any_([x for x in value])))

        # If this key was filtered get a list of the matching values, used
        # in the ESGF query
        terms[key] = [x[0] for x in (s.query(getattr(C6Dataset,key))
            .distinct()
            .filter(getattr(C6Dataset,key).ilike(any_([x for x in value]))))]

I suppose this worked fine when we were running local and missing separately. It must have been something to do with changing the workflow

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

Successfully merging a pull request may close this issue.

2 participants