fix: file asset uploading and deleting (#496)

This commit is contained in:
pablohashescobar 2023-03-22 23:38:47 +05:30 committed by GitHub
parent f615f8ac0c
commit 27b1308227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 4 deletions

View file

@ -91,8 +91,6 @@ class UserAssetsEndpoint(BaseAPIView):
def delete(self, request, asset_key):
try:
asset_key = "user-profile" + "/" + asset_key
print(asset_key)
file_asset = FileAsset.objects.get(asset=asset_key, created_by=request.user)
# Delete the file from storage
file_asset.asset.delete(save=False)