Skip to content

Commit 4a11284

Browse files
committed
stabilize ordering of tax unit generated ids
1 parent e417e57 commit 4a11284

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/donation/repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ export async function getDonorIdsByEmail(
499499
select id
500500
from donor
501501
where email = $1
502-
order by tin is null, created_at`,
502+
order by tin is null, created_at, id`,
503503
[email],
504504
)
505505
).rows;
@@ -647,7 +647,7 @@ export async function getDonorsDetailedByEmail(
647647
from donor_stats ds
648648
left join tax_deductions td on ds.donor_id = td.donor_id
649649
group by ds.donor_id, ds.name, ds.tin, ds.created_at, ds.sum_donations, ds.num_donations
650-
order by ds.tin is null, ds.created_at
650+
order by ds.tin is null, ds.created_at, ds.donor_id
651651
`,
652652
[email],
653653
)

0 commit comments

Comments
 (0)