-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Display warning when creating dataset without organizations #3054
Display warning when creating dataset without organizations #3054
Conversation
@@ -27,7 +27,7 @@ def owner_org_validator(key, data, errors, context): | |||
|
|||
if value is missing or value is None: | |||
if not authz.check_config_permission('create_unowned_dataset'): | |||
raise Invalid(_('A organization must be supplied')) | |||
raise Invalid(_('An organization must be provided')) |
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.
This will break a bunch of existing translations. Just flagging it :)
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.
That is something that I though about to. But there is no way to avoid it, is there?
6a29f20
to
ff93ffb
Compare
@amercader The problem with the tests that make each other fail is now fixed. I documented the reasoning for this rather uncommon patching / cache invalidation in the code so that future readers understand what is going on and so that we have a "complex" tests that we could potentially copy from in the future if similar things come up. |
I'll make this into a decorator. |
Great stuff @k-nut, love |
Fixes #3046, #2767
Proposed fixes:
As discussed in #3046 already this now checks if there are organizations to which the dataset can be added or not. If there are non it checks if the user is allowed to create on or not and depending on the answer provides them with a link.
The tests are failing right now unfortunately. When either one of them is commented out they both pass but the first one fails when run together. Any idea what this could be? Also I feel bad for having to introduce
patch
in those tests again, maybe there is a better way to do it?Features: