--- a/cubicweb/server/repository.py Fri Nov 03 15:26:32 2017 +0100
+++ b/cubicweb/server/repository.py Thu Nov 30 11:20:58 2017 +0100
@@ -923,10 +923,7 @@
for subjeid, objeid in eids_subj_obj:
print('ADD relation', subjeid, rtype, objeid)
for subjeid, objeid in eids_subj_obj:
- if rtype in relations_by_rtype:
- relations_by_rtype[rtype].append((subjeid, objeid))
- else:
- relations_by_rtype[rtype] = [(subjeid, objeid)]
+ relations_by_rtype.setdefault(rtype, []).append((subjeid, objeid))
if not activintegrity:
continue
# take care to relation of cardinality '?1', as all eids will