Fixed further user input issues

This commit is contained in:
Frikky
2024-03-19 23:56:16 +01:00
parent 06494a0093
commit 54b3687eef
9 changed files with 148 additions and 38 deletions
+9 -2
View File
@@ -1371,9 +1371,16 @@ class AppBase:
returns = []
for item in value:
self.logger.info("VALUE: %s" % item)
self.logger.info("FILE VALUE: %s" % item)
# Check if item is a dict, and if it is, check if it has the key "id"
if isinstance(item, dict):
if "file_id" in item:
item = item["file_id"]
elif "id" in item:
item = item["id"]
if len(item) != 36 and not item.startswith("file_"):
self.logger.info("Bad length for file value %s" % item)
self.logger.info("Bad length for file value: '%s'" % item)
continue
#return {
# "filename": "",