crud
This commit is contained in:
parent
45b6389fa0
commit
5534fda8bf
@ -197,8 +197,9 @@ class CRUD(object):
|
|||||||
|
|
||||||
pk = await self.primaryKey()
|
pk = await self.primaryKey()
|
||||||
k = pk[0]['field_name']
|
k = pk[0]['field_name']
|
||||||
v = getID()
|
if not data.get(k):
|
||||||
data[k] = v
|
v = getID()
|
||||||
|
data[k] = v
|
||||||
data = self.oa.execute(self.dbname+'_'+self.tablename,'beforeAdd',data)
|
data = self.oa.execute(self.dbname+'_'+self.tablename,'beforeAdd',data)
|
||||||
await addSQL(self.dbname,data)
|
await addSQL(self.dbname,data)
|
||||||
data = self.oa.execute(self.dbname+'_'+self.tablename,'afterAdd',data)
|
data = self.oa.execute(self.dbname+'_'+self.tablename,'afterAdd',data)
|
||||||
|
Loading…
Reference in New Issue
Block a user