Minor improvements
This commit is contained in:
parent
6d780ac38e
commit
f746754c24
|
@ -1,6 +1,6 @@
|
|||
/* Dataset visibility toggler
|
||||
* When no organization is selected in the org dropdown then set visibility to
|
||||
* public always and disable dropdown
|
||||
/* Dataset allowed_users and adquire_url toggler
|
||||
* allowd_users and adquire_url can only be active when a user attempts to create
|
||||
* a private dataset outside an organization
|
||||
*/
|
||||
|
||||
this.ckan.module('allowed-users', function ($, _) {
|
||||
|
|
|
@ -174,10 +174,7 @@ class ControllerTest(unittest.TestCase):
|
|||
elif dataset_id in not_updatable_datasets and allowed_users is not None and user_datasets['user'] not in allowed_users:
|
||||
warns.append('Dataset %s: %s' % (dataset_id, ADD_USERS_ERROR))
|
||||
|
||||
if len(warns) > 0:
|
||||
expected_result = json.dumps({'warns': warns})
|
||||
else:
|
||||
expected_result = None
|
||||
expected_result = json.dumps({'warns': warns}) if len(warns) > 0 else None
|
||||
|
||||
# Check that the returned result is as expected
|
||||
self.assertEquals(expected_result, result)
|
||||
|
|
Loading…
Reference in New Issue