Removed and fixed broken checks

This commit is contained in:
Visual 2020-03-30 17:13:39 +00:00
parent 8ccf6304a3
commit 261753e399
1 changed files with 2 additions and 4 deletions

View File

@ -333,7 +333,7 @@ class IconManager:
*args, *args,
) )
if not icon_row: if icon_row is None:
return None return None
icon = Icon(icon_row["key"], icon_row["hash"], icon_row["mime"]) icon = Icon(icon_row["key"], icon_row["hash"], icon_row["mime"])
@ -371,9 +371,6 @@ class IconManager:
# get an extension for the given data uri # get an extension for the given data uri
extension = get_ext(mime) extension = get_ext(mime)
if "bsize" in kwargs and len(raw_data) > kwargs["bsize"]:
return _invalid(kwargs)
# size management is different for gif files # size management is different for gif files
# as they're composed of multiple frames. # as they're composed of multiple frames.
if "size" in kwargs and mime == "image/gif": if "size" in kwargs and mime == "image/gif":
@ -529,3 +526,4 @@ class IconManager:
await self.delete(old_icon) await self.delete(old_icon)
return await self.put(scope, key, new_icon_data, **kwargs) return await self.put(scope, key, new_icon_data, **kwargs)