ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: filestorage upload и preview вложений

This commit is contained in:
DCCONSTRUCTIONS
2026-04-25 13:05:03 +03:00
parent 5f2d543cab
commit c4032e3040
43 changed files with 982 additions and 127 deletions
@@ -192,6 +192,7 @@ class DynamicBaseSerializer(BaseSerializer):
issue_attachments = FileAsset.objects.filter(
issue_id=issue_id,
entity_type=FileAsset.EntityTypeContext.ISSUE_ATTACHMENT,
is_uploaded=True,
)
# Serialize issue_attachments and add them to the response
response["issue_attachments"] = IssueAttachmentLiteSerializer(issue_attachments, many=True).data
@@ -61,6 +61,11 @@ class WorkSpaceSerializer(DynamicBaseSerializer):
)
return value
def validate_storage_file_size_limit(self, value):
if value is not None and int(value) < 1:
raise serializers.ValidationError("Storage file size limit must be greater than zero")
return value
class Meta:
model = Workspace
fields = "__all__"