Skip to content

Commit 0292917

Browse files
fix trash after @pcrespov review
1 parent 96362e2 commit 0292917

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/web/server/src/simcore_service_webserver/licenses/_licensed_resources_repository.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ async def update(
122122
licensed_resources.c.modified.name: func.now(),
123123
}
124124

125+
# trashing
126+
assert "trash" in dict(LicensedResourcePatchDB.model_fields) # nosec
127+
if trash := _updates.pop("trash", None):
128+
_updates[licensed_resources.c.trashed.name] = func.now() if trash else None
129+
125130
async with transaction_context(get_asyncpg_engine(app), connection) as conn:
126131
result = await conn.execute(
127132
licensed_resources.update()

0 commit comments

Comments
 (0)