Skip to content

Commit ecd783a

Browse files
committed
fix: resolve pr review comments
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent 0714ba9 commit ecd783a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • services/apps/git_integration/src/crowdgit/database

services/apps/git_integration/src/crowdgit/database/crud.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,9 @@ async def insert_member_organizations(rows: list[dict]) -> None:
737737
"updatedAt"
738738
)
739739
VALUES ($1, $2, NULL, NULL, NULL, $3, false, NOW(), NOW())
740-
ON CONFLICT ("memberId", "organizationId", "dateStart", "dateEnd") DO NOTHING
740+
ON CONFLICT ("memberId", "organizationId")
741+
WHERE ("dateStart" IS NULL AND "dateEnd" IS NULL)
742+
DO NOTHING
741743
"""
742744
await executemany(
743745
sql_query,

0 commit comments

Comments
 (0)