mirror of https://gitlab.com/litecord/litecord.git
Removed and fixed broken checks
This commit is contained in:
parent
8ccf6304a3
commit
261753e399
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue