[FIX] UserError: don't display None in Warning popup.
UserError uses a retrocompatibility function 'except_orm' which one can take a second parameters. The default value of this second param is None, so if we don't force an empty string, we will see a None on each raise UserError as last line.
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ class except_orm(Exception):
|
||||
|
||||
class UserError(except_orm):
|
||||
def __init__(self, msg):
|
||||
super(UserError, self).__init__(msg)
|
||||
super(UserError, self).__init__(msg, value='')
|
||||
|
||||
|
||||
# deprecated due to collision with builtins, kept for compatibility
|
||||
|
||||
Reference in New Issue
Block a user