Skip to content

Commit f9c216a

Browse files
authored
Merge pull request #544 from bellisk/fix/set-boolean-options-as-bools
fix: Convert boolean options to bools
2 parents c99e06a + 0034bbd commit f9c216a

File tree

1 file changed

+3
-3
lines changed
  • ckanext/harvest/logic/action

1 file changed

+3
-3
lines changed

ckanext/harvest/logic/action/get.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def harvest_object_list(context, data_dict):
287287

288288
session = context['session']
289289

290-
only_current = data_dict.get('only_current', True)
290+
only_current = p.toolkit.asbool(data_dict.get('only_current', True))
291291
source_id = data_dict.get('source_id', False)
292292

293293
query = session.query(HarvestObject)
@@ -371,8 +371,8 @@ def _get_sources_for_user(context, data_dict, organization_id=None, limit=None):
371371
session = context['session']
372372
user = context.get('user', '')
373373

374-
only_active = data_dict.get('only_active', False)
375-
only_to_run = data_dict.get('only_to_run', False)
374+
only_active = p.toolkit.asbool(data_dict.get('only_active', False))
375+
only_to_run = p.toolkit.asbool(data_dict.get('only_to_run', False))
376376

377377
query = session.query(HarvestSource) \
378378
.order_by(HarvestSource.created.desc())

0 commit comments

Comments
 (0)