fix: 修复无法对响应异常动态注入信息的问题

This commit is contained in:
han0
2021-02-25 19:06:11 +08:00
parent 2859eff644
commit 7ec7cd4f4d

View File

@@ -1,3 +1,5 @@
import copy
from werkzeug.wrappers import Response
from flask import json
@@ -16,8 +18,9 @@ class ResponseMeta(Exception):
self.extra = kwargs
def update(self, **kwargs):
self.extra.update(kwargs)
return self
obj = copy.copy(self)
obj.extra.update(kwargs)
return obj
def present(self):
data = {}