创建产品变动日志bug
This commit is contained in:
parent
046bd4c0ee
commit
feebb616a9
|
@ -162,8 +162,9 @@ class WpmService(object):
|
||||||
ins = WproductFlow()
|
ins = WproductFlow()
|
||||||
ins.wproduct = instance
|
ins.wproduct = instance
|
||||||
for f in WproductFlow._meta.fields:
|
for f in WproductFlow._meta.fields:
|
||||||
if f.name not in ['id', 'wproduct', 'is_lastlog']:
|
if f.name not in ['id', 'wproduct', 'is_lastlog', 'child']:
|
||||||
setattr(ins, f.name, getattr(instance, f.name, None))
|
setattr(ins, f.name, getattr(instance, f.name, None))
|
||||||
|
ins.child = instance.child
|
||||||
ins.change_str = change_str
|
ins.change_str = change_str
|
||||||
ins.save()
|
ins.save()
|
||||||
|
|
||||||
|
@ -178,8 +179,9 @@ class WpmService(object):
|
||||||
ins = WproductFlow()
|
ins = WproductFlow()
|
||||||
ins.wproduct = i
|
ins.wproduct = i
|
||||||
for f in WproductFlow._meta.fields:
|
for f in WproductFlow._meta.fields:
|
||||||
if f.name not in ['id', 'wproduct', 'is_lastlog']:
|
if f.name not in ['id', 'wproduct', 'is_lastlog', 'child']:
|
||||||
setattr(ins, f.name, getattr(i, f.name, None))
|
setattr(ins, f.name, getattr(i, f.name, None))
|
||||||
|
ins.child = i.child
|
||||||
ins.change_str = change_str
|
ins.change_str = change_str
|
||||||
wfw.append(ins)
|
wfw.append(ins)
|
||||||
WproductFlow.objects.bulk_create(wfw)
|
WproductFlow.objects.bulk_create(wfw)
|
||||||
|
|
Loading…
Reference in New Issue