Skip to content

Commit

Permalink
Updating databse object of extra preferences to take dict() and not l…
Browse files Browse the repository at this point in the history
…ist()
  • Loading branch information
anuprulez committed Nov 11, 2016
1 parent 5327042 commit cc96000
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/galaxy/webapps/galaxy/api/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _build_extra_user_pref_inputs(self, preferences, user):
field = item + '|' + input['name']
for data_item in data:
if field in data_item:
input['value'] = data_item[field]
input['value'] = data[data_item]
extra_pref_inputs.append({'type': 'section', 'title': section['description'], 'name': item, 'expanded': True, 'inputs': section['inputs']})
return extra_pref_inputs

Expand Down Expand Up @@ -417,15 +417,14 @@ def set_information(self, trans, id, payload={}, **kwd):
user.values = form_values

# Update values for extra user preference items
extra_user_pref_data = list()
extra_user_pref_data = dict()
get_extra_pref_keys = self._get_extra_user_preferences(trans)
for key in get_extra_pref_keys:
key_prefix = key + '|'
for item in payload:
if item.startswith(key_prefix):
extra_user_pref_data.append({ item : payload[item] })
extra_user_pref_data[item] = payload[item]
user.preferences["extra_user_preferences"] = json.dumps(extra_user_pref_data)

# Update user addresses
address_dicts = {}
address_count = 0
Expand Down

0 comments on commit cc96000

Please sign in to comment.