Formatting...
authorThierry Florac <thierry.florac@onf.fr>
Fri, 30 Mar 2018 09:12:24 +0200
changeset 503 264f9b53a714
parent 502 9ba37584f255
child 504 2c0c2f13789b
Formatting...
src/pyams_content/root/zmi/sites.py
--- a/src/pyams_content/root/zmi/sites.py	Thu Mar 29 16:01:54 2018 +0200
+++ b/src/pyams_content/root/zmi/sites.py	Fri Mar 30 09:12:24 2018 +0200
@@ -190,12 +190,20 @@
     translate = request.localizer.translate
     name = request.params.get('object_name')
     if not name:
-        return {'status': 'message',
-                'messagebox': {'status': 'error',
-                               'content': translate(_("No provided object_name argument!"))}}
+        return {
+            'status': 'message',
+            'messagebox': {
+                'status': 'error',
+                'content': translate(_("No provided object_name argument!"))
+            }
+        }
     if name not in request.context:
-        return {'status': 'message',
-                'messagebox': {'status': 'error',
-                               'content': translate(_("Given site name doesn't exist!"))}}
+        return {
+            'status': 'message',
+            'messagebox': {
+                'status': 'error',
+                'content': translate(_("Given site name doesn't exist!"))
+            }
+        }
     del request.context[name]
     return {'status': 'success'}