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
This commit is contained in:
2025-07-04 07:39:37 +09:30
parent 4fb94bdd6d
commit 4344265ed5

View File

@ -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
)