Skip to content

Commit

Permalink
update when repos are updated
Browse files Browse the repository at this point in the history
  • Loading branch information
leafty committed Mar 5, 2024
1 parent da778e8 commit 0818b96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/renku_data_services/project/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Any, Callable, Dict, List, NamedTuple, Tuple, cast

from sanic.log import logger
from sqlalchemy import func, select
from sqlalchemy import func, select, update
from sqlalchemy.ext.asyncio import AsyncSession

import renku_data_services.base_models as base_models
Expand Down Expand Up @@ -158,6 +158,10 @@ async def update_project(
schemas.ProjectRepositoryORM(url=r, project_id=project_id, project=project)
for r in payload["repositories"]
]
# Trigger update for ``updated_at`` column
await session.execute(
update(schemas.ProjectORM).where(schemas.ProjectORM.id == project_id).values()
)

for key, value in payload.items():
# NOTE: ``slug``, ``id``, ``created_by``, and ``creation_date`` cannot be edited
Expand Down

0 comments on commit 0818b96

Please sign in to comment.