Commit 69a0b2c3 authored by Vincent Pelletier's avatar Vincent Pelletier

Raise KeyError when the listbox is not found in the request. This exception is...

Raise KeyError when the listbox is not found in the request. This exception is then handled in ERP5Form/Field.py.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9763 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7a9e722c
...@@ -2732,7 +2732,10 @@ class ListBoxValidator(Validator.Validator): ...@@ -2732,7 +2732,10 @@ class ListBoxValidator(Validator.Validator):
result = {} result = {}
error_result = {} error_result = {}
listbox_uids = REQUEST.get('%s_uid' % field.id, []) MARKER = []
listbox_uids = REQUEST.get('%s_uid' % field.id, MARKER)
if listbox_uids is MARKER:
raise KeyError, 'Field %s is not present in request object.' % (field.id, )
#LOG('ListBox.validate: REQUEST',0,REQUEST) #LOG('ListBox.validate: REQUEST',0,REQUEST)
errors = [] errors = []
object_list = [] object_list = []
......
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