Skip to content

Bug fix: --user-filter and config invocation default precedence #378

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

Merged

Conversation

bhunut-adobe
Copy link
Collaborator

@bhunut-adobe bhunut-adobe commented Aug 6, 2018

When specify --user-filter manually via cmd line. The value does not set in console output.

When specifying --user-filter and invocation default. --user-filter does not override with arg value instead it listed config file value.

#379

@vossen-adobe
Copy link
Contributor

vossen-adobe commented Aug 8, 2018

Nice! Can we get the same behavior using the following?

username_filter_pattern = options['user_filter'] = self.args['user_filter'] or options['user_filter']

@adorton-adobe
Copy link
Collaborator

@janssenda-adobe I like the idea, but self.args['user_filter'] will evaluate to False if it set to certain non-None values such as 0, [] or "" (empty string). I think we're safer going with the explicit check that it isn't None. We could do a one-liner in the form Y if X else Z but I think it's clearer to leave it as it is.

@adorton-adobe adorton-adobe merged commit 6750238 into adobe-apiplatform:v2 Aug 30, 2018
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 this pull request may close these issues.

3 participants