Пример #1
0
def get_form( name ):
    fdc_list = sa_session.query( galaxy.model.FormDefinitionCurrent ) \
                         .filter( galaxy.model.FormDefinitionCurrent.table.c.deleted == False ) \
                         .order_by( galaxy.model.FormDefinitionCurrent.table.c.create_time.desc() )
    for fdc in fdc_list:
        sa_session.refresh( fdc )
        sa_session.refresh( fdc.latest_form )
        if fdc.latest_form.name == name:
            return fdc.latest_form
    return None
Пример #2
0
def refresh( obj ):
    sa_session.refresh( obj )