server/schemahooks.py
branchstable
changeset 2195 58bef4f707ce
parent 2101 08003e0354a7
child 2250 bc6fc4d6bcac
equal deleted inserted replaced
2194:c8c8ef5c5c65 2195:58bef4f707ce
    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