audit-logger: use copy of params we later modify to prevent from modification by the store function of parameters that we only use for reading.
marcink -
r4195:4c53d118 stable
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -151,20 +151,22
151
151
152
152
153 def store_web(*args, **kwargs):
153 def store_web(*args, **kwargs):
154 if 'action_data' not in kwargs:
154 action_data = {}
155 kwargs['action_data'] = {}
155 org_action_data = kwargs.pop('action_data', {})
156 kwargs['action_data'].update({
156 action_data.update(org_action_data)
157 'source': SOURCE_WEB
157 action_data['source'] = SOURCE_WEB
158 })
158 kwargs['action_data'] = action_data
159
159 return store(*args, **kwargs)
160 return store(*args, **kwargs)
160
161
161
162
162 def store_api(*args, **kwargs):
163 def store_api(*args, **kwargs):
163 if 'action_data' not in kwargs:
164 action_data = {}
164 kwargs['action_data'] = {}
165 org_action_data = kwargs.pop('action_data', {})
165 kwargs['action_data'].update({
166 action_data.update(org_action_data)
166 'source': SOURCE_API
167 action_data['source'] = SOURCE_API
167 })
168 kwargs['action_data'] = action_data
169
168 return store(*args, **kwargs)
170 return store(*args, **kwargs)
169
171
170
172
Comments 0
You need to be logged in to leave comments. Login now