Skip to content

Commit

Permalink
Hardcode the site url
Browse files Browse the repository at this point in the history
  • Loading branch information
blagojabozinovski committed May 17, 2024
1 parent 0e2b5a1 commit 1bf90c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/validation/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ 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(
resource_url = 'localhost:5000/{}/dataset/{}/resource/{}'.format(
config['ckan.site_url'],
dataset['name'],
resource['id'])
Expand All @@ -217,7 +217,7 @@ def _process_row_full(self, dataset, resource, writer):

error_counts = {}

resource_url = '{}/dataset/{}/resource/{}'.format(
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 @@ -8,6 +8,7 @@
import requests
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 1bf90c1

Please sign in to comment.