chore: issue attachment deletion (#5903)
This commit is contained in:
parent
25a410719b
commit
5afa686a21
3 changed files with 5 additions and 5 deletions
|
|
@ -209,7 +209,7 @@ class UserAssetsV2Endpoint(BaseAPIView):
|
||||||
# update the attributes
|
# update the attributes
|
||||||
asset.attributes = request.data.get("attributes", asset.attributes)
|
asset.attributes = request.data.get("attributes", asset.attributes)
|
||||||
# save the asset
|
# save the asset
|
||||||
asset.save()
|
asset.save(created_by=request.user)
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
||||||
def delete(self, request, asset_id):
|
def delete(self, request, asset_id):
|
||||||
|
|
@ -459,7 +459,7 @@ class WorkspaceFileAssetEndpoint(BaseAPIView):
|
||||||
# update the attributes
|
# update the attributes
|
||||||
asset.attributes = request.data.get("attributes", asset.attributes)
|
asset.attributes = request.data.get("attributes", asset.attributes)
|
||||||
# save the asset
|
# save the asset
|
||||||
asset.save()
|
asset.save(created_by=request.user)
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
||||||
def delete(self, request, slug, asset_id):
|
def delete(self, request, slug, asset_id):
|
||||||
|
|
@ -690,7 +690,7 @@ class ProjectAssetEndpoint(BaseAPIView):
|
||||||
# update the attributes
|
# update the attributes
|
||||||
asset.attributes = request.data.get("attributes", asset.attributes)
|
asset.attributes = request.data.get("attributes", asset.attributes)
|
||||||
# save the asset
|
# save the asset
|
||||||
asset.save()
|
asset.save(created_by=request.user)
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
||||||
@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])
|
@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])
|
||||||
|
|
|
||||||
|
|
@ -257,5 +257,5 @@ class IssueAttachmentV2Endpoint(BaseAPIView):
|
||||||
# Get the storage metadata
|
# Get the storage metadata
|
||||||
if not issue_attachment.storage_metadata:
|
if not issue_attachment.storage_metadata:
|
||||||
get_asset_object_metadata.delay(str(issue_attachment.id))
|
get_asset_object_metadata.delay(str(issue_attachment.id))
|
||||||
issue_attachment.save()
|
issue_attachment.save(created_by=request.user)
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ class EntityAssetEndpoint(BaseAPIView):
|
||||||
# update the attributes
|
# update the attributes
|
||||||
asset.attributes = request.data.get("attributes", asset.attributes)
|
asset.attributes = request.data.get("attributes", asset.attributes)
|
||||||
# save the asset
|
# save the asset
|
||||||
asset.save()
|
asset.save(created_by=request.user)
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
||||||
def delete(self, request, anchor, pk):
|
def delete(self, request, anchor, pk):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue