chore: issue attachment deletion (#5903)

This commit is contained in:
Bavisetti Narayan 2024-10-23 20:11:01 +05:30 committed by GitHub
parent 25a410719b
commit 5afa686a21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -209,7 +209,7 @@ class UserAssetsV2Endpoint(BaseAPIView):
# update the attributes
asset.attributes = request.data.get("attributes", asset.attributes)
# save the asset
asset.save()
asset.save(created_by=request.user)
return Response(status=status.HTTP_204_NO_CONTENT)
def delete(self, request, asset_id):
@ -459,7 +459,7 @@ class WorkspaceFileAssetEndpoint(BaseAPIView):
# update the attributes
asset.attributes = request.data.get("attributes", asset.attributes)
# save the asset
asset.save()
asset.save(created_by=request.user)
return Response(status=status.HTTP_204_NO_CONTENT)
def delete(self, request, slug, asset_id):
@ -690,7 +690,7 @@ class ProjectAssetEndpoint(BaseAPIView):
# update the attributes
asset.attributes = request.data.get("attributes", asset.attributes)
# save the asset
asset.save()
asset.save(created_by=request.user)
return Response(status=status.HTTP_204_NO_CONTENT)
@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])