Skip to content

Commit 6335905

Browse files
nesitorAndres D. Molins
and
Andres D. Molins
authored
Fix pending POST messages increase (#782)
* Fix: Seems that with POST messages without item_type, the content is not well set. I have applied a fix to allow modifying and set it. * Fix: Solve user permissions on Ubuntu 24.04 image. * Fix: Solve Group creation with the same guid. --------- Co-authored-by: Andres D. Molins <[email protected]>
1 parent 703fa45 commit 6335905

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

deployment/docker-build/pyaleph.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ RUN pip install -e .
5858

5959
FROM base
6060

61-
RUN useradd -s /bin/bash aleph
61+
RUN groupadd -g 1000 -o aleph
62+
RUN useradd -s /bin/bash -u 1000 -g 1000 -o aleph
6263

6364
COPY --from=builder --chown=aleph /opt/venv /opt/venv
6465
COPY --from=builder --chown=aleph /opt/pyaleph /opt/pyaleph

src/aleph/web/controllers/accounts.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from aiohttp import web
66
from aleph_message.models import MessageType
7-
from pydantic import ValidationError
7+
from pydantic import TypeAdapter, ValidationError
88

99
import aleph.toolkit.json as aleph_json
1010
from aleph.db.accessors.balances import (
@@ -151,13 +151,11 @@ async def get_account_files(request: web.Request) -> web.Response:
151151
if not file_pins:
152152
raise web.HTTPNotFound()
153153

154+
adapter = TypeAdapter(list[GetAccountFilesResponseItem])
154155
response = GetAccountFilesResponse(
155156
address=address,
156157
total_size=total_size,
157-
files=[
158-
GetAccountFilesResponseItem.model_validate(dict(file_pin))
159-
for file_pin in file_pins
160-
],
158+
files=adapter.validate_python(file_pins),
161159
pagination_page=query_params.page,
162160
pagination_total=nb_files,
163161
pagination_per_page=query_params.pagination,

0 commit comments

Comments
 (0)