More robust type enforcement

This commit is contained in:
awsr
2026-01-13 04:10:35 -08:00
parent 3654d0fa18
commit cf41ba15d9
+1 -1
View File
@@ -61,7 +61,7 @@ def image_from_url_text(filedata: str | list | dict | None):
if len(filedata) == 0:
return None
filedata = filedata[0]
if type(filedata) == dict:
if not isinstance(filedata, str):
shared.log.warning('Incorrect filedata received')
return None
if filedata.startswith("data:image/png;base64,"):