Skip to content

Commit

Permalink
Hardcode ckan_site_url
Browse files Browse the repository at this point in the history
  • Loading branch information
stojanovskis1 committed Dec 18, 2024
1 parent 15f47ac commit ceeaeaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckanext/validation/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ def _run_validation_on_resource(self, resource_id, dataset_id):
msg.format(resource_id, dataset_id))

def _process_row(self, dataset, resource, writer):
resource_url = '{}/dataset/{}/resource/{}'.format(
config['ckan.site_url'],
resource_url = 'localhost:5000/dataset/{}/resource/{}'.format(
# config['ckan.site_url'],
dataset['name'],
resource['id'])

Expand All @@ -217,8 +217,8 @@ def _process_row_full(self, dataset, resource, writer):

error_counts = {}

resource_url = '{}/dataset/{}/resource/{}'.format(
config['ckan.site_url'],
resource_url = 'localhost:5000/dataset/{}/resource/{}'.format(
# config['ckan.site_url'],
dataset['name'],
resource['id'])

Expand Down
2 changes: 2 additions & 0 deletions ckanext/validation/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from sqlalchemy.orm.exc import NoResultFound
from frictionless import validate, system, Report, Schema, Dialect, Check

from ckan.common import config
from ckan.model import Session
import ckan.lib.uploader as uploader

Expand Down Expand Up @@ -76,6 +77,7 @@ def run_validation_job(resource):

if not source:
source = resource['url']
source = source.replace(config.get('ckan.site.url'), "http://localhost:5000")

schema = resource.get('schema')
if schema:
Expand Down

0 comments on commit ceeaeaf

Please sign in to comment.