Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • opendata/ckanext-odsh
1 result
Select Git revision
Show changes
Commits on Source (2)
......@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Corrected `_parse_distributions` of `ODSHDCATdeProfile` to not rely on resource dict, fixing missing `id` errors.
- Resolved an issue where harvested datasets were incorrectly required to have a category set, even when the configuration variable `ckanext.odsh.require_at_least_one_category` was set to false.
## [2.5.0] - 2025-01-30
......
......@@ -32,7 +32,7 @@ def validate_extra_groups(data, requireAtLeastOne, errors):
log.debug("Validating extra_groups")
value = _extract_value(data, 'groups')
error_message_no_group = 'at least one group needed'
if value != None:
if value is not None:
# 'value != None' means the extra key 'groups' was found,
# so the dataset came from manual editing via the web-frontend.
if not value:
......@@ -55,7 +55,7 @@ def validate_extra_groups(data, requireAtLeastOne, errors):
data[('groups', num, 'id')] = group
else: # no extra-field 'groups'
# dataset might come from a harvest process
if not data.get(('groups', 0, 'id'), False) and \
if requireAtLeastOne and not data.get(('groups', 0, 'id'), False) and \
not data.get(('groups', 0, 'name'), False):
errors['groups'] = error_message_no_group
......