equal
deleted
inserted
replaced
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 |