Skip to content

Commit e5e1918

Browse files
committed
Reverting line change
I think both work correctly, so I'll just keep the one you wrote :)
1 parent 10427c8 commit e5e1918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pysimplesql/pysimplesql.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ def set_by_pk(
13861386

13871387
# Move to the numerical index of where the primary key is located.
13881388
# If the pk value can't be found, move to the last index
1389-
idx = self.rows.sort_index().index[self.rows[self.pk_column] == pk].tolist()
1389+
idx = [i for i, value in enumerate(self.rows[self.pk_column]) if value == pk]
13901390
idx = idx[0] if idx else len(self.rows.index)
13911391
self.current_index = idx
13921392

0 commit comments

Comments
 (0)