@@ -207,7 +207,7 @@ def _apply_action(
207207 custom_mask : str | None = None ,
208208 regex_pattern : str | None = None ,
209209 mask_format : str | None = None ,
210- ** kwargs : Any ,
210+ ** encryption_context : Any ,
211211 ) -> Any :
212212 """
213213 Helper method to determine whether to apply a given action to the entire input data
@@ -242,19 +242,24 @@ def _apply_action(
242242 custom_mask = custom_mask ,
243243 regex_pattern = regex_pattern ,
244244 mask_format = mask_format ,
245- ** kwargs ,
246245 )
247246 else :
248247 logger .debug (f"Running action { action .__name__ } with the entire data" )
249- return action (
250- data = data ,
251- provider_options = provider_options ,
252- dynamic_mask = dynamic_mask ,
253- custom_mask = custom_mask ,
254- regex_pattern = regex_pattern ,
255- mask_format = mask_format ,
256- ** kwargs ,
257- )
248+ if action .__name__ == "erase" :
249+ return action (
250+ data = data ,
251+ provider_options = provider_options ,
252+ dynamic_mask = dynamic_mask ,
253+ custom_mask = custom_mask ,
254+ regex_pattern = regex_pattern ,
255+ mask_format = mask_format ,
256+ )
257+ else :
258+ return action (
259+ data = data ,
260+ provider_options = provider_options ,
261+ ** encryption_context ,
262+ )
258263
259264 def _apply_action_to_fields (
260265 self ,
0 commit comments