diff options
Diffstat (limited to 'UnitOperations.py')
-rw-r--r-- | UnitOperations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/UnitOperations.py b/UnitOperations.py index ea7c916..595a49d 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -130,8 +130,8 @@ class UnitOperation(): for k in self.parameters: self.OM_data_init += ', ' - self.OM_data_init += k + ' = ' + ('"' + self.variables[k]['value'] + '"' if isinstance(self.variables[k]['value'], str) - else str(json.dumps(self.variables[k]['value']).replace('[', '{').replace(']', '}'))) + self.OM_data_init += k + ' = ' + (json.dumps(self.variables[k]['value']) if json.dumps(self.variables[k]['value']).replace('"', '').replace('_', '').isalpha() + else json.dumps(self.variables[k]['value']).replace('[', '{').replace(']', '}').replace('"', '')) self.OM_data_init += ');\n' return self.OM_data_init |