aboutsummaryrefslogtreecommitdiff
path: root/userapi/storage/devices/sqlite3/devices_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'userapi/storage/devices/sqlite3/devices_table.go')
-rw-r--r--userapi/storage/devices/sqlite3/devices_table.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/userapi/storage/devices/sqlite3/devices_table.go b/userapi/storage/devices/sqlite3/devices_table.go
index c93e8b77..ecf43524 100644
--- a/userapi/storage/devices/sqlite3/devices_table.go
+++ b/userapi/storage/devices/sqlite3/devices_table.go
@@ -231,11 +231,10 @@ func (s *devicesStatements) selectDeviceByID(
}
func (s *devicesStatements) selectDevicesByLocalpart(
- ctx context.Context, localpart string,
+ ctx context.Context, txn *sql.Tx, localpart string,
) ([]api.Device, error) {
devices := []api.Device{}
-
- rows, err := s.selectDevicesByLocalpartStmt.QueryContext(ctx, localpart)
+ rows, err := sqlutil.TxStmt(txn, s.selectDevicesByLocalpartStmt).QueryContext(ctx, localpart)
if err != nil {
return devices, err