Added JSON and list checks to app sdk parsing

This commit is contained in:
frikky
2022-03-26 11:33:01 +01:00
parent cff2b88845
commit 3d5e02d8da
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -3050,7 +3050,7 @@ class AppBase:
try: try:
for key, value in params.items(): for key, value in params.items():
try: try:
if isinstance(value, str): if isinstance(value, str) and ((value.startswith("{") and value.endswith("}")) or (value.startswith("[") and value.endswith("]"))):
params[key] = ast.literal_eval(value) params[key] = ast.literal_eval(value)
except Exception as e: except Exception as e:
self.logger.info(f"[DEBUG] Failed parsing value with ast: {e}") self.logger.info(f"[DEBUG] Failed parsing value with ast: {e}")
+2 -1
View File
@@ -74,6 +74,7 @@ import {
Pause as PauseIcon, Pause as PauseIcon,
Delete as DeleteIcon, Delete as DeleteIcon,
AddCircleOutline as AddCircleOutlineIcon, AddCircleOutline as AddCircleOutlineIcon,
Circle as CircleIcon,
Save as SaveIcon, Save as SaveIcon,
KeyboardArrowLeft as KeyboardArrowLeftIcon, KeyboardArrowLeft as KeyboardArrowLeftIcon,
KeyboardArrowRight as KeyboardArrowRightIcon, KeyboardArrowRight as KeyboardArrowRightIcon,
@@ -1905,7 +1906,7 @@ const ParsedAction = (props) => {
) : pathdata.type === "list" ? ( ) : pathdata.type === "list" ? (
<FormatListNumberedIcon style={{marginLeft: 9, marginRight: 10, }} /> <FormatListNumberedIcon style={{marginLeft: 9, marginRight: 10, }} />
) : ( ) : (
<AddCircleOutlineIcon style={{marginLeft: 9, marginRight: 10, color: coverColor}}/> <Circle style={{marginLeft: 9, marginRight: 10, color: coverColor}}/>
); );
//<ExpandMoreIcon style={iconStyle} /> //<ExpandMoreIcon style={iconStyle} />
+3
View File
@@ -713,6 +713,9 @@ const Workflows = (props) => {
Before publishing, we will sanitize all inputs, remove references to Before publishing, we will sanitize all inputs, remove references to
you, randomize ID's and remove your authentication. you, randomize ID's and remove your authentication.
</Typography> </Typography>
<Typography variant="body1" style={{ marginBottom: 20 }}>
The published workflow is yours, and you can always change your public workflows after they are released.
</Typography>
</div> </div>
<Button <Button
variant="contained" variant="contained"