Skip to content

Commit

Permalink
Merge branch 'master' into canada-py3
Browse files Browse the repository at this point in the history
  • Loading branch information
JVickery-TBS committed May 13, 2024
2 parents 00e3ca9 + 590a632 commit 60b198b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ckanext/canada/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from six import text_type

from ckan.plugins.toolkit import _, get_action, ValidationError
from ckan.plugins.toolkit import _, get_action, ValidationError, ObjectNotFound
from ckan.lib.navl.validators import StopOnError
from ckan.authz import is_sysadmin
from ckan import model
Expand All @@ -17,7 +17,6 @@
import uuid
from datetime import datetime

from ckanapi import LocalCKAN, NotFound
from ckan.lib.helpers import date_str_to_datetime
from ckantoolkit import get_validator, Invalid, missing
from ckanext.fluent.validators import fluent_text_output, LANG_SUFFIX
Expand Down Expand Up @@ -196,8 +195,8 @@ def canada_copy_from_org_name(key, data, errors, context):
if not org_id:
return
try:
org = LocalCKAN(username='').action.organization_show(id=org_id)
except NotFound:
org = get_action('organization_show')(dict(context), {'id': org_id})
except ObjectNotFound:
return

data[key] = json.dumps({
Expand Down

0 comments on commit 60b198b

Please sign in to comment.