Merge pull request #1594 from makeplane/sync/ce-ee

Sync: Community Changes
This commit is contained in:
pushya22
2024-10-23 21:06:41 +05:30
committed by GitHub
3 changed files with 10 additions and 5 deletions

View File

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

View File

@@ -270,9 +270,10 @@ class IssueAttachmentV2Endpoint(BaseAPIView):
# Update the attachment
issue_attachment.is_uploaded = True
issue_attachment.created_by = request.user
# Get the storage metadata
if not issue_attachment.storage_metadata:
get_asset_object_metadata.delay(str(issue_attachment.id))
issue_attachment.save(created_by=request.user)
issue_attachment.save()
return Response(status=status.HTTP_204_NO_CONTENT)

View File

@@ -169,7 +169,8 @@ class EntityAssetEndpoint(BaseAPIView):
# update the attributes
asset.attributes = request.data.get("attributes", asset.attributes)
# save the asset
asset.save(created_by=request.user)
asset.created_by = request.user
asset.save()
return Response(status=status.HTTP_204_NO_CONTENT)
def delete(self, request, anchor, pk):