From ead8e445ce68c0c0c95915b3ccdf2d3c226e4f7f Mon Sep 17 00:00:00 2001 From: Daryl Lim <5508348+daryllimyt@users.noreply.github.com> Date: Thu, 9 May 2024 01:23:54 -0700 Subject: [PATCH] refactor(engine): Add sentinel type for integration role --- tracecat/integrations/_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracecat/integrations/_registry.py b/tracecat/integrations/_registry.py index d0b32c30..ca4016f3 100644 --- a/tracecat/integrations/_registry.py +++ b/tracecat/integrations/_registry.py @@ -75,7 +75,7 @@ def wrapper(*args, **kwargs): 3. Clean up the environment after the function has executed. """ secret_objs: list[Secret] = [] - role: Role = kwargs.pop("__role", None) + role: Role = kwargs.pop("__role", Role(type="service")) with logger.contextualize(user_id=role.user_id, pid=os.getpid()): try: # Get secrets from the secrets API