Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ async def create(self, lamp_entity: LampEntity) -> LampEntity:

self._session.add(db_lamp)
await self._session.flush()
await self._session.commit()
await self._session.refresh(db_lamp)
Comment on lines 58 to 61
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test coverage gap: the existing PostgresLampRepository integration tests exercise create() and then get() within the same SQLAlchemy session/transaction, which would still pass even if create() only did flush() (the root cause described in the PR). To prevent regressions, add a test that creates a lamp, closes the session/request, and then uses a new session/repository instance to get() the lamp and assert it is found.

Copilot generated this review using guidance from repository custom instructions.

return self._to_entity(db_lamp)
Expand Down
Loading