forked from rDrama/rDrama
parent
cbfb2c2c99
commit
546883dcd5
|
@ -166,7 +166,7 @@ if SITE not in ('pcmemes.net', 'watchpeopledie.tv'):
|
||||||
|
|
||||||
def remove_asset(cls, type_name:str, v:User, name:str) -> dict[str, str]:
|
def remove_asset(cls, type_name:str, v:User, name:str) -> dict[str, str]:
|
||||||
if cls not in ASSET_TYPES: raise Exception("not a valid asset type")
|
if cls not in ASSET_TYPES: raise Exception("not a valid asset type")
|
||||||
name = name.lower.strip()
|
name = name.lower().strip()
|
||||||
if not name:
|
if not name:
|
||||||
abort(400, f"You need to specify a {type_name}!")
|
abort(400, f"You need to specify a {type_name}!")
|
||||||
asset = g.db.query(cls).filter_by(name=name).one_or_none()
|
asset = g.db.query(cls).filter_by(name=name).one_or_none()
|
||||||
|
|
Loading…
Reference in New Issue