Validate with the context user if user is root

This commit is contained in:
Cédric Krier committed 2009-04-09 11:43:00 +02:00
1 parent 7303edd66d
commit 2060c8f391
1 file changed
+6
+6
View File
@@ -789,6 +789,12 @@ class ModelStorage(Model):
def _validate(self, cursor, user, ids, context=None):
if context is None:
context = {}
if user == 0 and context.get('user'):
ctx = context.copy()
del ctx['user']
return self._validate(cursor, context['user'], ids, context=ctx)
context = context.copy()
field_error = []
field_err_str = []