Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Nov 15, 2024
1 parent 949f6a6 commit b1ce2ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/partitions_status/type.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ static PyObject *AerospikePartitionsStatus__getitem__(PyObject *self,
}
else if (PyLong_Check(py_key)) {
unsigned long partition_id = PyLong_AsUnsignedLong(py_key);
unsigned long partition_idx =
partition_id - py_partitions_status->parts_all->part_begin;
as_partition_status *part_status =
&py_partitions_status->parts_all->parts[partition_id];
&py_partitions_status->parts_all->parts[partition_idx];
PyObject *py_partition_status =
create_py_partition_status_object(part_status);
if (py_partition_status == NULL) {
Expand Down

0 comments on commit b1ce2ba

Please sign in to comment.