mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 04:51:51 +00:00
fix(Task): fix serializer to convert None to null when decoding (#63)
This commit is contained in:
committed by
GitHub
parent
01045c973f
commit
43f9a5b1d0
@@ -285,7 +285,7 @@ class TaskSerializer(RLSSerializer, TaskBase):
|
||||
task_args = self.get_json_field(obj, "task_kwargs")
|
||||
# Celery task_kwargs are stored as a double string JSON in the database when not empty
|
||||
if isinstance(task_args, str):
|
||||
task_args = json.loads(task_args.replace("'", '"'))
|
||||
task_args = json.loads(task_args.replace("'", '"').replace("None", "null"))
|
||||
# Remove tenant_id from task_kwargs if present
|
||||
task_args.pop("tenant_id", None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user