Skip to content

Commit

Permalink
chore: issue attachment deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
NarayanBavisetti committed Oct 23, 2024
1 parent 25a4107 commit a4d2524
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions apiserver/plane/app/views/asset/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def patch(self, request, asset_id):
# 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):
Expand Down Expand Up @@ -459,7 +459,7 @@ def patch(self, request, slug, asset_id):
# 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):
Expand Down Expand Up @@ -690,7 +690,7 @@ def patch(self, request, slug, project_id, pk):
# 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])
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/app/views/issue/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,5 @@ def patch(self, request, slug, project_id, issue_id, pk):
# Get the storage metadata
if not issue_attachment.storage_metadata:
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)
2 changes: 1 addition & 1 deletion apiserver/plane/space/views/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def patch(self, request, anchor, pk):
# 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, anchor, pk):
Expand Down

0 comments on commit a4d2524

Please sign in to comment.