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
COMPASS-360: cancel empty validation rule #732
Conversation
@KeyboardTsundoku just to check I understand: are you demonstrating here that a collection that doesn't have doc validation enabled appears the same in the UI as a collection that has it enabled with no rules? |
Yes, exactly! |
Something similar would work - but lets not worry about it too much for now, the amount of times someone will encounter this is small. Lets close this out and open a new ticket for making OFF vs ON with no rules easier to interpret. |
if (!_.has(this.lastFetchedValidatorDoc, 'validationAction') | ||
&& !_.has(this.lastFetchedValidatorDoc, 'validationLevel') | ||
&& _.isEmpty(this.lastFetchedValidatorDoc.validator)) { | ||
state.editState = _.isEqual(this.lastFetchedValidatorDoc.validator, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we just confirmed that this.lastFetchedValidatorDoc.validator
is empty in the line above, it would be easier to just check if validatorDoc.validator
is also empty, rather than compare the two. Makes it more readable, too.
8ffe819
to
1ddb062
Compare
LGTM. Will address the minor issue of empty validator doc vs. no rules present when the issue comes up. I don't think in practice it makes a difference. |
No description provided.