def storageKnowledge(is_opertaion): pp = Product.query.filter_by(name='KNOWLEDGE_V1.1.0').first() if pp == None: pp = Product() pp.id = '4' pp.name = 'KNOWLEDGE_V1.1.0' pp.is_operation = is_opertaion pp.updateTime = datetime.now() db.session.add(pp) db.session.commit()
def storageWorkingDSM(is_opertaion): pp = Product.query.filter_by(name='WORKING_DSM_V1.0.0').first() if pp == None: pp = Product() pp.id = '3' pp.name = 'WORKING_DSM_V1.0.0' pp.is_operation = is_opertaion pp.updateTime = datetime.now() db.session.add(pp) db.session.commit()