Commit b71db182 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[entity] fix fetch_rql w/ case where it's called while entity is not...

[entity] fix fetch_rql w/ case where it's called while entity is not 'complete' (eg time where it's being added but have not yet all mandatory relations set)

--HG--
branch : stable
parent e3a5b7c3f767
......@@ -254,8 +254,11 @@ class Entity(AppObject, dict):
selection.pop()
restrictions.pop()
continue
if card == '?':
restrictions[-1] += '?' # left outer join if not mandatory
# XXX we need outer join in case the relation is not mandatory
# (card == '?') *or if the entity is being added*, since in
# that case the relation may still be missing. As we miss this
# later information here, systematically add it.
restrictions[-1] += '?'
destcls = cls.vreg['etypes'].etype_class(desttype)
destcls._fetch_restrictions(var, varmaker, destcls.fetch_attrs,
selection, orderby, restrictions,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment