Skip to content

Commit

Permalink
util.construct_state_param_for_add bug fix: handle comma-separated fe…
Browse files Browse the repository at this point in the history
…ature param

fixes #1651
  • Loading branch information
snarfed committed Jan 26, 2024
1 parent 864fb65 commit ad082f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,9 @@ def construct_state_param_for_add(state=None, **kwargs):
('callback', 'feature', 'id', 'user_url')}
state_obj['operation'] = request.values.get('operation') or 'add'

feature = state_obj.get('feature')
if feature and feature not in FEATURES:
error(f'Unknown feature {feature}')
for feature in (state_obj.get('feature') or '').split(','):
if feature and feature not in FEATURES:
error(f'Unknown feature {feature}')

if kwargs:
state_obj.update(kwargs)
Expand Down

0 comments on commit ad082f7

Please sign in to comment.