Fix deleting

This commit is contained in:
2022-02-09 14:30:07 +03:00
parent 2702283872
commit 0ecee0b08e

View File

@@ -82,7 +82,7 @@ async def download_cached_file(object_id: int, object_type: str):
@router.delete("/{object_id}/{object_type}", response_model=CachedFile)
async def delete_cached_file(object_id: int, object_type: str):
cached_file = await CachedFileDB.objects.get(
cached_file = await CachedFileDB.objects.get_or_none(
object_id=object_id, object_type=object_type
)