本文整理匯總了Python中app.model.DBSession.lot_submitter_id方法的典型用法代碼示例。如果您正苦於以下問題:Python DBSession.lot_submitter_id方法的具體用法?Python DBSession.lot_submitter_id怎麽用?Python DBSession.lot_submitter_id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app.model.DBSession
的用法示例。
在下文中一共展示了DBSession.lot_submitter_id方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: gridInsert
# 需要導入模塊: from app.model import DBSession [as 別名]
# 或者: from app.model.DBSession import lot_submitter_id [as 別名]
def gridInsert(self, modelObjects,row):
rack = modelObjects[Rack]
dbRack = None
vial = modelObjects[Vial]
if rack.rack_barcode:
dbRack = Rack.byBarcode(rack.rack_barcode)
if dbRack is None:
dbRack = Rack()
dbRack.rack_barcode = rack.rack_barcode
if vial.well:
dbRack.rack_type_id = vial.well.rack_type_id
DBSession().add(dbRack)
DBSession().flush()
mol=modelObjects[Mol]
mol=mergeMol(mol)
lot=modelObjects[Lot]
if lot.lot_id is None:
mol.addLot(lot, 0)
else:
lot=DBSession().merge(lot)
lot.vials.append(vial)
if dbRack:
vial.vial_rack_id = dbRack.rack_id
vial.vial_lot_aliquot_no = len(lot.vials)
if lot.lot_submitter_id == None:
lot.lot_submitter_id = request.identity['user'].user_id
if hasattr(mol,'mol_reg_id') and not row.has_key('verify'):
if mol.mol_reg_id is None:
mol.setAltId(row['prefix'])
DBSession().flush()
return mol, lot, vial, dbRack