Document: fix domain passing in node_res_dir

Conflicts:

	document/nodes.py

bzr revid: p_christ@hol.gr-20100629135632-8d5cp645woc8g3l5
This commit is contained in:
P. Christeas 2010-06-29 16:56:32 +03:00
parent 0e5dbb787c
commit 4fd7b06c30
1 changed files with 9 additions and 1 deletions

View File

@ -417,7 +417,15 @@ class node_res_dir(node_class):
ctx.update(self.dctx)
where = []
if self.domain:
where += safe_eval(self.domain, self.dctx)
app = safe_eval(self.domain, self.dctx)
if not app:
pass
elif isinstance(app, list):
where.extend(app)
elif isinstance(app, tuple):
where.append(app)
else:
raise RuntimeError("incorrect domain expr: %s" % self.domain)
if self.resm_id:
where.append(('id','=',self.resm_id))