mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
More robust type enforcement
This commit is contained in:
@@ -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,"):
|
||||
|
||||
Reference in New Issue
Block a user