Skip to content

Commit

Permalink
fix(logic): dialect;
Browse files Browse the repository at this point in the history
- Fixed static dialect usage for new frictionless code.
  • Loading branch information
JVickery-TBS committed Jun 27, 2024
1 parent a375734 commit a58bfab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckanext/validation/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ def _validate_table(source, _format='csv', schema=None, **options):

# Load the Resource Dialect as described in https://framework.frictionlessdata.io/docs/framework/dialect.html
if 'dialect' in options:
dialect = Dialect.from_descriptor(options['dialect'])
# (canada fork only): support static validation dialect options
if _format in options.get('dialect'):
dialect = Dialect.from_descriptor(options.get('dialect')[_format])
else:
dialect = Dialect.from_descriptor(options['dialect'])
options['dialect'] = dialect

# Load the list of checks and its parameters declaratively as in https://framework.frictionlessdata.io/docs/checks/table.html
Expand Down

0 comments on commit a58bfab

Please sign in to comment.