Skip to content

Commit

Permalink
fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Dec 4, 2023
1 parent df92d89 commit 588f639
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ckanext/datagovtheme/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,17 @@ def render_datetime_datagov(date_str):
return date_str
return value


def get_geoplatform_link(harvest_object_name):
url = f"https://stg-api.geoplatform.gov/v3/public/lookups/data-gov/dataset?name={harvest_object_name}"
try:
req = urllib.request.urlopen(url)
if req.getcode() == 200:
return json.loads(req.read())["geoplatform_url"]
except:
except Exception:
pass



def get_harvest_object_formats(harvest_object_id):
try:
obj = p.toolkit.get_action('harvest_object_show')({}, {'id': harvest_object_id})
Expand Down

0 comments on commit 588f639

Please sign in to comment.