Commit 9d67f191 authored by PJ Janse van Rensburg's avatar PJ Janse van Rensburg

Merge branch 'master' of github.com:flask-admin/flask-admin

parents 32f4edb3 683e99f9
......@@ -1557,7 +1557,7 @@ class BaseModelView(BaseView, ActionsMixin):
try:
self.on_model_change(form, model, is_created)
except TypeError as e:
if re.match(r'on_model_change\(\) takes .* 3 .* arguments .* 4 .* given .*', e.message):
if re.match(r'on_model_change\(\) takes .* 3 .* arguments .* 4 .* given .*', str(e)):
msg = ('%s.on_model_change() now accepts third ' +
'parameter is_created. Please update your code') % self.model
warnings.warn(msg)
......
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