Skip to content

Commit

Permalink
remove parameter check and test
Browse files Browse the repository at this point in the history
  • Loading branch information
m-goggins committed Feb 10, 2025
1 parent e4140d0 commit 30f07e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/recordlinker/database/mpi_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,6 @@ def update_patient_person_ids(
"""
Update the person_id for all Patients associated with a Person.
"""
# Check that the person_ids are valid integers
if not all(isinstance(pid, int) for pid in person_ids):
raise SQLAlchemyError("All person_ids must be integers.")

session.query(models.Patient).filter(models.Patient.person_id.in_(person_ids)).update(
{models.Patient.person_id: person.id}
)
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/database/test_mpi_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,6 @@ def test_invalid_person_id(self, session):
with pytest.raises(sqlalchemy.exc.SQLAlchemyError):
mpi_service.update_patient_person_ids(session, models.Person(), "123")

def test_invalid_person_id_value(self, session):
with pytest.raises(sqlalchemy.exc.SQLAlchemyError):
mpi_service.update_patient_person_ids(session, models.Person(), ["123"])

def test_update_patient_person_ids(self, session):
# Tests that we can update the person_id of a patient
person1 = models.Person()
Expand Down

0 comments on commit 30f07e1

Please sign in to comment.