921 for rtype, eids_subj_obj in relations.items(): |
921 for rtype, eids_subj_obj in relations.items(): |
922 if server.DEBUG & server.DBG_REPO: |
922 if server.DEBUG & server.DBG_REPO: |
923 for subjeid, objeid in eids_subj_obj: |
923 for subjeid, objeid in eids_subj_obj: |
924 print('ADD relation', subjeid, rtype, objeid) |
924 print('ADD relation', subjeid, rtype, objeid) |
925 for subjeid, objeid in eids_subj_obj: |
925 for subjeid, objeid in eids_subj_obj: |
926 if rtype in relations_by_rtype: |
926 relations_by_rtype.setdefault(rtype, []).append((subjeid, objeid)) |
927 relations_by_rtype[rtype].append((subjeid, objeid)) |
|
928 else: |
|
929 relations_by_rtype[rtype] = [(subjeid, objeid)] |
|
930 if not activintegrity: |
927 if not activintegrity: |
931 continue |
928 continue |
932 # take care to relation of cardinality '?1', as all eids will |
929 # take care to relation of cardinality '?1', as all eids will |
933 # be inserted later, we've remove duplicated eids since they |
930 # be inserted later, we've remove duplicated eids since they |
934 # won't be caught by `del_existing_rel_if_needed` |
931 # won't be caught by `del_existing_rel_if_needed` |