Skip to content

Commit edc588b

Browse files
fix: resolve ruff E501 line too long in DuplicateAssetEndpoint
1 parent 8f01000 commit edc588b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • apps/api/plane/app/views/asset

apps/api/plane/app/views/asset/v2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,8 @@ def post(self, request, slug, asset_id):
758758
if not original_asset:
759759
return Response({"error": "Asset not found"}, status=status.HTTP_404_NOT_FOUND)
760760

761-
destination_key = f"{workspace.id}/{uuid.uuid4().hex}-{sanitize_filename(original_asset.attributes.get('name')) or 'unnamed'}"
761+
sanitized_name = sanitize_filename(original_asset.attributes.get("name")) or "unnamed"
762+
destination_key = f"{workspace.id}/{uuid.uuid4().hex}-{sanitized_name}"
762763
duplicated_asset = FileAsset.objects.create(
763764
attributes={
764765
"name": original_asset.attributes.get("name"),

0 commit comments

Comments
 (0)