Skip to content

Commit 0fbda92

Browse files
committed
fix: update ORDER BY clause to handle NULL values correctly
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent 1b7ca03 commit 0fbda92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/libs/data-access-layer/src/members/segments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export async function findMemberManualAffiliation(
191191
OR ("dateStart" <= $(timestamp) AND "dateEnd" IS NULL)
192192
OR ("dateStart" IS NULL AND "dateEnd" IS NULL)
193193
)
194-
ORDER BY "dateStart" DESC, id
194+
ORDER BY "dateStart" DESC NULLS LAST, id
195195
LIMIT 1
196196
`,
197197
{

0 commit comments

Comments
 (0)