Skip to content

Commit

Permalink
[#1188] Tweak checks to support empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jan 8, 2014
1 parent 8386c14 commit aec8351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/logic/validators.py
Expand Up @@ -699,10 +699,10 @@ def datasets_with_no_organization_cannot_be_private(key, data, errors,

check_passed = True

if not dataset_id and private and owner_org is None:
if not dataset_id and private and not owner_org:
# When creating a dataset, enforce it directly
check_passed = False
elif dataset_id and private and owner_org is None:
elif dataset_id and private and not owner_org:
# Check if the dataset actually has an owner_org, even if not provided
try:
dataset_dict = logic.get_action('package_show')({},
Expand Down

0 comments on commit aec8351

Please sign in to comment.