server/hooks.py
branchstable
changeset 3056 61f71ed15cfa
parent 2909 e695b7b0359d
child 3071 6ad4e6d4df86
equal deleted inserted replaced
3055:06814d57514f 3056:61f71ed15cfa
    35     eschema = session.repo.schema.eschema(etype)
    35     eschema = session.repo.schema.eschema(etype)
    36     # eschema.eid is None if schema has been readen from the filesystem, not
    36     # eschema.eid is None if schema has been readen from the filesystem, not
    37     # from the database (eg during tests)
    37     # from the database (eg during tests)
    38     if eschema.eid is None:
    38     if eschema.eid is None:
    39         eschema.eid = session.unsafe_execute(
    39         eschema.eid = session.unsafe_execute(
    40             'Any X WHERE X is CWEType, X name %(name)s', {'name': etype})[0][0]
    40             'Any X WHERE X is CWEType, X name %(name)s', {'name': str(etype)})[0][0]
    41     return eschema.eid
    41     return eschema.eid
    42 
    42 
    43 
    43 
    44 # base meta-data handling ######################################################
    44 # base meta-data handling ######################################################
    45 
    45