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:
@ -1,3 +1,5 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.db.models.signals import post_delete
|
from django.db.models.signals import post_delete
|
||||||
@ -355,6 +357,10 @@ class Cluster(TenancyObject):
|
|||||||
|
|
||||||
if self.config:
|
if self.config:
|
||||||
|
|
||||||
|
if isinstance(self.config, str):
|
||||||
|
self.config = json.loads(self.config)
|
||||||
|
self.save()
|
||||||
|
|
||||||
rendered_config.update(
|
rendered_config.update(
|
||||||
self.config
|
self.config
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user