fix: 修复无法对响应异常动态注入信息的问题
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import copy
|
||||||
|
|
||||||
from werkzeug.wrappers import Response
|
from werkzeug.wrappers import Response
|
||||||
from flask import json
|
from flask import json
|
||||||
|
|
||||||
@@ -16,8 +18,9 @@ class ResponseMeta(Exception):
|
|||||||
self.extra = kwargs
|
self.extra = kwargs
|
||||||
|
|
||||||
def update(self, **kwargs):
|
def update(self, **kwargs):
|
||||||
self.extra.update(kwargs)
|
obj = copy.copy(self)
|
||||||
return self
|
obj.extra.update(kwargs)
|
||||||
|
return obj
|
||||||
|
|
||||||
def present(self):
|
def present(self):
|
||||||
data = {}
|
data = {}
|
||||||
|
Reference in New Issue
Block a user