server/schemahooks.py
branchstable
changeset 2213 713e220e7425
parent 2195 58bef4f707ce
child 2250 bc6fc4d6bcac
equal deleted inserted replaced
2212:201ce0d389f3 2213:713e220e7425
    36                ]
    36                ]
    37 
    37 
    38 def get_constraints(session, entity):
    38 def get_constraints(session, entity):
    39     constraints = []
    39     constraints = []
    40     for cstreid in session.transaction_data.get(entity.eid, ()):
    40     for cstreid in session.transaction_data.get(entity.eid, ()):
    41         cstrent = session.entity(cstreid)
    41         cstrent = session.entity_from_eid(cstreid)
    42         cstr = CONSTRAINTS[cstrent.type].deserialize(cstrent.value)
    42         cstr = CONSTRAINTS[cstrent.type].deserialize(cstrent.value)
    43         cstr.eid = cstreid
    43         cstr.eid = cstreid
    44         constraints.append(cstr)
    44         constraints.append(cstr)
    45     return constraints
    45     return constraints
    46 
    46