-
Notifications
You must be signed in to change notification settings - Fork 68
[AL-5172] Global key support for Annotation Types #986
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
Conversation
| return v | ||
| @root_validator() | ||
| def must_set_one(cls, values): | ||
| if bool(values.get('id')) == bool(values.get('global_key')): |
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.
| if bool(values.get('id')) == bool(values.get('global_key')): | |
| if bool(values.get('id')) == bool(values.get('global_key')) == None: # to be on a safe side |
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 this logic can be a little tricky to read, might want to create a util function that describes what it does, e.g. is_exactly_one_set(values.get('id'), values.get('global_key'))
…into kkim/AL-5172
| return v | ||
| @root_validator() | ||
| def must_set_one(cls, values): | ||
| if bool(values.get('id')) == bool(values.get('global_key')): |
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 this logic can be a little tricky to read, might want to create a util function that describes what it does, e.g. is_exactly_one_set(values.get('id'), values.get('global_key'))
whistler
left a comment
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.
LGTM!
Uh oh!
There was an error while loading. Please reload this page.