--- a/web/views/editcontroller.py Fri Jul 03 16:50:13 2009 +0200
+++ b/web/views/editcontroller.py Fri Jul 03 17:57:19 2009 +0200
@@ -25,9 +25,8 @@
class EditController(ViewController):
id = 'edit'
- def publish(self, rset=None, fromjson=False):
+ def publish(self, rset=None):
"""edit / create / copy / delete entity / relations"""
- self.fromjson = fromjson
for key in self.req.form:
# There should be 0 or 1 action
if key.startswith('__action_'):
@@ -115,7 +114,7 @@
except ValidationError, ex:
# ex.entity may be an int or an entity instance
self._to_create[formparams['eid']] = ex.entity
- if self.fromjson:
+ if self.req.json_request: # XXX (syt) why?
ex.entity = formparams['eid']
raise
self._to_create[formparams['eid']] = eid