Commit d99ab448 authored by Willem ter Berg's avatar Willem ter Berg

fixed tuple ref

parent 2ebdcd48
......@@ -38,7 +38,7 @@ def referentiedata_on_update(key, data_dict, errors, context):
if isinstance(data_dict[key], bool) and authz.is_sysadmin(context.get('user')):
return key, data_dict, errors, context
stored_dataset = context['session'].query(context['model'].Package).get(data_dict['id'])
stored_dataset = context['session'].query(context['model'].Package).get(data_dict[('id',)])
data_dict[key] = stored_dataset[('extras', 'referentiedata',)]
return key, data_dict, errors, context
......@@ -75,7 +75,7 @@ def high_value_on_update(key, data_dict, errors, context):
if isinstance(data_dict[key], bool) and authz.is_sysadmin(context.get('user')):
return key, data_dict, errors, context
stored_dataset = context['session'].query(context['model'].Package).get(data_dict['id'])
stored_dataset = context['session'].query(context['model'].Package).get(data_dict[('id',)])
data_dict[key] = stored_dataset[('extras', 'high_value',)]
return key, data_dict, errors, context
......@@ -112,7 +112,7 @@ def basisregister_on_update(key, data_dict, errors, context):
if isinstance(data_dict[key], bool) and authz.is_sysadmin(context.get('user')):
return key, data_dict, errors, context
stored_dataset = context['session'].query(context['model'].Package).get(data_dict['id'])
stored_dataset = context['session'].query(context['model'].Package).get(data_dict[('id',)])
data_dict[key] = stored_dataset[('extras', 'high_value',)]
return key, data_dict, errors, context
......@@ -146,7 +146,7 @@ def link_status_update(key, data_dict, errors, context):
if isinstance(data_dict[key], bool) and authz.is_sysadmin(context.get('user')):
return key, data_dict, errors, context
stored_dataset = context['session'].query(context['model'].Resource).get(data_dict['id'])
stored_dataset = context['session'].query(context['model'].Resource).get(data_dict[('id',)])
data_dict[key] = stored_dataset[('link_status',)]
return key, data_dict, errors, context
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment