diff --git a/.github/workflows/openapi-push.yml b/.github/workflows/openapi-push.yml index 3850dff..52a289a 100644 --- a/.github/workflows/openapi-push.yml +++ b/.github/workflows/openapi-push.yml @@ -19,9 +19,9 @@ jobs: python-version: "3.10" - name: Install app run: | - python -m pip install git+https://github.com/openg2p/openg2p-fastapi-common@develop\#subdirectory=openg2p-fastapi-common - python -m pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-common-lib - python -m pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-mapper-lib + python -m pip install openg2p-fastapi-common==1.0.0 + python -m pip install openg2p-g2pconnect-common-lib==1.0.0 + python -m pip install openg2p-g2pconnect-mapper-lib==1.0.0 python -m pip install . - name: Generate openapi json run: | diff --git a/Dockerfile b/Dockerfile index ae56439..2b1f121 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,9 +22,9 @@ ADD --chown=${container_user}:${container_user_group} main.py /app RUN python3 -m venv venv \ && . ./venv/bin/activate RUN python3 -m pip install \ - git+https://github.com/openg2p/openg2p-fastapi-common@develop\#subdirectory=openg2p-fastapi-common \ - git+https://github.com/OpenG2P/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-common-lib \ - git+https://github.com/OpenG2P/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-mapper-lib \ + openg2p-fastapi-common==1.0.0 \ + openg2p-g2pconnect-common-lib==1.0.0 \ + openg2p-g2pconnect-mapper-lib==1.0.0 \ ./src CMD python3 main.py migrate; \ diff --git a/src/openg2p_spar_mapper_api/services/id_fa_mapping_validations.py b/src/openg2p_spar_mapper_api/services/id_fa_mapping_validations.py index 215c3fd..3632010 100644 --- a/src/openg2p_spar_mapper_api/services/id_fa_mapping_validations.py +++ b/src/openg2p_spar_mapper_api/services/id_fa_mapping_validations.py @@ -44,10 +44,7 @@ async def validate_link_request( # Check if the ID is already mapped result = await connection.execute( select(IdFaMapping).where( - and_( - IdFaMapping.id_value == single_link_request.id, - IdFaMapping.fa_value == single_link_request.fa, - ) + IdFaMapping.id_value == single_link_request.id, ) ) link_request_from_db = result.first() diff --git a/src/openg2p_spar_mapper_api/services/mapper.py b/src/openg2p_spar_mapper_api/services/mapper.py index 81c2114..2b586a8 100644 --- a/src/openg2p_spar_mapper_api/services/mapper.py +++ b/src/openg2p_spar_mapper_api/services/mapper.py @@ -168,10 +168,7 @@ async def update_mapping(self, session, single_update_request): if single_update_request.phone_number: result.phone = single_update_request.phone_number if single_update_request.additional_info: - addl_info_copy = ( - result.additional_info.copy() if result.additional_info else [] - ) - result.additional_info = addl_info_copy + result.additional_info = single_update_request.additional_info else: single_response.status = StatusEnum.rjct single_response.status_reason_code = UpdateStatusReasonCode.rjct_id_invalid diff --git a/test-requirements.txt b/test-requirements.txt index 5f3a815..12702ed 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,5 @@ pytest-asyncio pytest-cov -git+https://github.com/openg2p/openg2p-fastapi-common@develop#subdirectory=openg2p-fastapi-common -git+https://github.com/openg2p/openg2p-g2pconnect-common@develop#subdirectory=openg2p-g2pconnect-common-lib -git+https://github.com/OpenG2P/openg2p-g2pconnect-common@develop#subdirectory=openg2p-g2pconnect-mapper-lib +openg2p-fastapi-common==1.0.0 +openg2p-g2pconnect-common-lib==1.0.0 +openg2p-g2pconnect-mapper-lib==1.0.0