mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Collapse 'acknowledge' parameter to boolean, 'False' meaning False
When a client submits non-boolean data for acknowledge, coerce it into boolean in some reasonable way.
This commit is contained in:
parent
f52eec6c19
commit
859aad793d
@ -693,7 +693,7 @@ class AlertDestination(ConfluentMessage):
|
||||
|
||||
class InputAlertDestination(ConfluentMessage):
|
||||
valid_alert_params = {
|
||||
'acknowledge': lambda x: x,
|
||||
'acknowledge': lambda x: False if type(x) in (unicode,str) and x.lower() == 'false' else bool(x),
|
||||
'ip': lambda x: x,
|
||||
'retries': lambda x: int(x)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user