Skip to content

Commit 30f07e1

Browse files
committed
remove parameter check and test
1 parent e4140d0 commit 30f07e1

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/recordlinker/database/mpi_service.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,6 @@ def update_patient_person_ids(
337337
"""
338338
Update the person_id for all Patients associated with a Person.
339339
"""
340-
# Check that the person_ids are valid integers
341-
if not all(isinstance(pid, int) for pid in person_ids):
342-
raise SQLAlchemyError("All person_ids must be integers.")
343-
344340
session.query(models.Patient).filter(models.Patient.person_id.in_(person_ids)).update(
345341
{models.Patient.person_id: person.id}
346342
)

tests/unit/database/test_mpi_service.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -847,10 +847,6 @@ def test_invalid_person_id(self, session):
847847
with pytest.raises(sqlalchemy.exc.SQLAlchemyError):
848848
mpi_service.update_patient_person_ids(session, models.Person(), "123")
849849

850-
def test_invalid_person_id_value(self, session):
851-
with pytest.raises(sqlalchemy.exc.SQLAlchemyError):
852-
mpi_service.update_patient_person_ids(session, models.Person(), ["123"])
853-
854850
def test_update_patient_person_ids(self, session):
855851
# Tests that we can update the person_id of a patient
856852
person1 = models.Person()

0 commit comments

Comments
 (0)