From 4344265ed58fa0c17b703b2cc0f8dfc3455d8251 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 4 Jul 2025 07:39:37 +0930 Subject: [PATCH] fix(itim): Correct config that is in the incorrect format Users can input config that contains bytecode chars which inturn, makes the config entered a str. convert any config that is a str to a dict, the correct format. ref: #851 fixes #850 --- app/itim/models/clusters.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/itim/models/clusters.py b/app/itim/models/clusters.py index ea6e5b35..dc9f6db8 100644 --- a/app/itim/models/clusters.py +++ b/app/itim/models/clusters.py @@ -1,3 +1,5 @@ +import json + from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_delete @@ -355,6 +357,10 @@ class Cluster(TenancyObject): if self.config: + if isinstance(self.config, str): + self.config = json.loads(self.config) + self.save() + rendered_config.update( self.config )