Show More
@@ -80,15 +80,17 b' class AuthnPluginViewBase(object):' | |||
|
80 | 80 | View that validates and stores the plugin settings. |
|
81 | 81 | """ |
|
82 | 82 | schema = self.plugin.get_settings_schema() |
|
83 | data = self.request.params | |
|
84 | ||
|
83 | 85 | try: |
|
84 |
valid_data = schema.deserialize( |
|
|
86 | valid_data = schema.deserialize(data) | |
|
85 | 87 | except colander.Invalid, e: |
|
86 | 88 | # Display error message and display form again. |
|
87 | 89 | self.request.session.flash( |
|
88 | 90 | _('Errors exist when saving plugin settings. ' |
|
89 | 91 | 'Please check the form inputs.'), |
|
90 | 92 | queue='error') |
|
91 | defaults = schema.flatten(self.request.params) | |
|
93 | defaults = {key: data[key] for key in data if key in schema} | |
|
92 | 94 | return self.settings_get(errors=e.asdict(), defaults=defaults) |
|
93 | 95 | |
|
94 | 96 | # Store validated data. |
General Comments 0
You need to be logged in to leave comments.
Login now