@@ -139,9 +139,6 @@ def get_values_of_keys(source, keys):
|
|||||||
|
|
||||||
def save_or_update_ie(table, pk_phhd, data):
|
def save_or_update_ie(table, pk_phhd, data):
|
||||||
data = {k: v for k, v in data.items() if v is not None and v != ""}
|
data = {k: v for k, v in data.items() if v is not None and v != ""}
|
||||||
if len(data) < 2:
|
|
||||||
# 没有识别数据就不存表了,因为pk_phhd一般都会有,所以判断小于2
|
|
||||||
return
|
|
||||||
obj = table(**data)
|
obj = table(**data)
|
||||||
session = MysqlSession()
|
session = MysqlSession()
|
||||||
db_data = session.query(table).filter_by(pk_phhd=pk_phhd).one_or_none()
|
db_data = session.query(table).filter_by(pk_phhd=pk_phhd).one_or_none()
|
||||||
|
|||||||
Reference in New Issue
Block a user