perf: 修复事务中任务执行

This commit is contained in:
ibuler
2023-09-21 14:28:34 +08:00
committed by 老广
parent b023ca0c69
commit cdbe5d31e9
7 changed files with 13 additions and 24 deletions

View File

@@ -18,6 +18,7 @@ def on_transaction_commit(func):
如果不调用on_commit, 对象创建时添加多对多字段值失败
"""
@wraps(func)
def inner(*args, **kwargs):
transaction.on_commit(lambda: func(*args, **kwargs))