server/querier.py
changeset 2680 66472d85d548
parent 2646 d2874ddd4347
child 3109 e7e1bb06b716
equal deleted inserted replaced
2679:3fa8c0cec760 2680:66472d85d548
   504             if isinstance(obj, basestring):
   504             if isinstance(obj, basestring):
   505                 obj = typed_eid(obj)
   505                 obj = typed_eid(obj)
   506             elif not isinstance(obj, (int, long)):
   506             elif not isinstance(obj, (int, long)):
   507                 obj = obj.eid
   507                 obj = obj.eid
   508             if repo.schema.rschema(rtype).inlined:
   508             if repo.schema.rschema(rtype).inlined:
   509                 entity = session.eid_rset(subj).get_entity(0, 0)
   509                 entity = session.entity_from_eid(subj)
   510                 entity[rtype] = obj
   510                 entity[rtype] = obj
   511                 repo.glob_update_entity(session, entity)
   511                 repo.glob_update_entity(session, entity)
   512             else:
   512             else:
   513                 repo.glob_add_relation(session, subj, rtype, obj)
   513                 repo.glob_add_relation(session, subj, rtype, obj)
   514 
   514