dataimport.py
changeset 9440 6880674c1a26
parent 9361 0542a85fe667
parent 9425 d7e8293fa4de
child 9478 2d7521881d3d
child 9515 b0dd5b57d2d8
equal deleted inserted replaced
9439:549c999d06d2 9440:6880674c1a26
  1062             data = {'cw_eid': subject, SQL_PREFIX + rtype: object}
  1062             data = {'cw_eid': subject, SQL_PREFIX + rtype: object}
  1063             subjtype = kwargs.get('subjtype')
  1063             subjtype = kwargs.get('subjtype')
  1064             if subjtype is None:
  1064             if subjtype is None:
  1065                 # Try to infer it
  1065                 # Try to infer it
  1066                 targets = [t.type for t in
  1066                 targets = [t.type for t in
  1067                            self.schema.rschema(rtype).targets()]
  1067                            self.schema.rschema(rtype).subjects()]
  1068                 if len(targets) == 1:
  1068                 if len(targets) == 1:
  1069                     subjtype = targets[0]
  1069                     subjtype = targets[0]
  1070                 else:
  1070                 else:
  1071                     raise ValueError('You should give the subject etype for '
  1071                     raise ValueError('You should give the subject etype for '
  1072                                      'inlined relation %s'
  1072                                      'inlined relation %s'