Skip to content

Commit

Permalink
Merge pull request #544 from bellisk/fix/set-boolean-options-as-bools
Browse files Browse the repository at this point in the history
fix: Convert boolean options to bools
  • Loading branch information
amercader authored Oct 31, 2024
2 parents c99e06a + 0034bbd commit f9c216a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckanext/harvest/logic/action/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def harvest_object_list(context, data_dict):

session = context['session']

only_current = data_dict.get('only_current', True)
only_current = p.toolkit.asbool(data_dict.get('only_current', True))
source_id = data_dict.get('source_id', False)

query = session.query(HarvestObject)
Expand Down Expand Up @@ -371,8 +371,8 @@ def _get_sources_for_user(context, data_dict, organization_id=None, limit=None):
session = context['session']
user = context.get('user', '')

only_active = data_dict.get('only_active', False)
only_to_run = data_dict.get('only_to_run', False)
only_active = p.toolkit.asbool(data_dict.get('only_active', False))
only_to_run = p.toolkit.asbool(data_dict.get('only_to_run', False))

query = session.query(HarvestSource) \
.order_by(HarvestSource.created.desc())
Expand Down

0 comments on commit f9c216a

Please sign in to comment.