Add active field to source dict

This commit is contained in:
amercader 2012-12-13 18:00:07 +00:00
parent 4da64a84ae
commit 81c3881a1a
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ def harvest_source_show(context,data_dict):
context['schema'] = harvest_source_db_to_form_schema()
source_dict = logic.get_action('package_show')(context, data_dict)
# For compatibility with old code, add the active field
# based on the package state
source_dict['active'] = (source_dict['state'] == 'active')
return source_dict