Skip to content

Commit ffa4556

Browse files
crozzyhdonnay
authored andcommitted
notifier: Avoid double reference
I guess the pgx lib changed to not account for this. Signed-off-by: crozzy <[email protected]> (cherry picked from commit 5446e49)
1 parent e02aba2 commit ffa4556

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

notifier/postgres/notifications.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,11 @@ func (s *Store) Notifications(ctx context.Context, id uuid.UUID, page *notifier.
118118
for rows.Next() {
119119
ns = append(ns, notifier.Notification{})
120120
n := &ns[len(ns)-1]
121-
if err := rows.Scan(&n.ID, &n); err != nil {
121+
if err := rows.Scan(&n.ID, n); err != nil {
122122
return err
123123
}
124124
}
125+
125126
if err := rows.Err(); err != nil {
126127
return err
127128
}
@@ -164,7 +165,7 @@ func (s *Store) Notifications(ctx context.Context, id uuid.UUID, page *notifier.
164165
for rows.Next() {
165166
ns = append(ns, notifier.Notification{})
166167
n := &ns[len(ns)-1]
167-
if err := rows.Scan(&n.ID, &n); err != nil {
168+
if err := rows.Scan(&n.ID, n); err != nil {
168169
return err
169170
}
170171
}

0 commit comments

Comments
 (0)