Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/integrationTesting' into INT-B-2…
Browse files Browse the repository at this point in the history
…0984-Validate-SIT-Departure-Date
  • Loading branch information
brianmanley-caci committed Feb 12, 2025
2 parents 8a936e0 + 2fa2a9c commit d9e138c
Show file tree
Hide file tree
Showing 41 changed files with 1,434 additions and 228 deletions.
44 changes: 22 additions & 22 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
variables:
#Docker config
DOCKER_AUTH_CONFIG: "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD\"}}}"
#hard code sha as newer version of debian is needed for pre-test
DOCKER_APP_IMAGE: milmove01/transcom-docker:milmove-app@sha256:ee774e9244afa2063bbbb7f9b973b17f1f5139366a1b7a676155df0b5268a7e1

DOCKER_APP_IMAGE: milmove01/transcom-docker:milmove-app
DOCKER_BASE_IMAGE: milmove01/transcom-docker:base
DOCKERHUB_USERNAME: DOCKERHUB_USERNAME
DOCKERHUB_PASSWORD: DOCKERHUB_PASSWORD
Expand Down Expand Up @@ -163,7 +163,7 @@ stages:
echo "{\"credHelpers\":{\"${ECR_REPOSITORY_URI}\":\"ecr-login\"}}" > /kaniko/.docker/config.json

.check_dp3: &check_dp3
- if: (($DP3_ENV == "exp" || $DP3_ENV == "loadtest" || $DP3_ENV == "demo") && $DP3_BRANCH == $CI_COMMIT_BRANCH)
- if: (($DP3_ENV == "exp" || $DP3_ENV == "loadtest" || $DP3_ENV == "demo") && $DP3_BRANCH == $CI_COMMIT_BRANCH)

.check_main: &check_main
- if: '$CI_COMMIT_BRANCH == "main"'
Expand Down Expand Up @@ -724,36 +724,36 @@ pre_test:
[ -d ~/transcom/mymove/spectral ] && cp -r ~/transcom/mymove/spectral /tmp/spectral_baseline || echo "Skipping saving baseline"
- rm -rf ~/transcom/mymove/spectral
- *install_yarn
# this is so we can avoid go mod downloading and resulting in an error on a false positive
- ./scripts/pre-commit-go-mod || exit 0
- echo "Run pre-commit tests without golangci-lint, eslint, or prettier"
- SKIP=golangci-lint,eslint,prettier,ato-go-linter,gomod,appcontext-linter pre-commit run --all-files
- |
echo "Run pre-commit tests with ato-go-linter only"
pre-commit run -v --all-files ato-go-linter
- |
echo "Run pre-commit tests with gomod only"
pre-commit run -v --all-files gomod,appcontext-linter
- |
echo "Run pre-commit tests with appcontext-linter only"
pre-commit run -v --all-files appcontext-linter
- SKIP=golangci-lint,eslint,prettier pre-commit run --all-files
- echo "Run pre-commit tests with golangci-lint only"
- |
echo 'export GOLANGCI_LINT_CONCURRENCY=4' >> $BASH_ENV
echo 'export GOLANGCI_LINT_VERBOSE=-v' >> $BASH_ENV
source $BASH_ENV
export GOLANGCI_LINT_CONCURRENCY=4
export GOLANGCI_LINT_VERBOSE=-v
mkdir -p tmp/test-results/pretest
pre-commit run -v --all-files golangci-lint | tee tmp/test-results/pretest/golangci-lint.out
- echo "Run prettier, eslint, danger checks"
# can this be removed in favor of golang_lint?
- pre-commit run -v --all-files golangci-lint | tee tmp/test-results/pretest/golangci-lint.out
- echo "Run prettier, eslint, danger checks"
- yarn prettier-ci
- yarn lint
- yarn danger ci --failOnErrors
- echo "Run spectral linter on all files"
- echo "Run spectral linter on all files"
- ./scripts/ensure-spectral-lint /tmp/spectral_baseline spectral
- ./scripts/pre-commit-go-mod || exit 0
allow_failure: true
after_script:
- *announce_failure
rules:
- *check_server_ignore_branch
artifacts:
reports:
codequality: tmp/test-results/pretest/golangci-lint.out
paths:
- tmp/test-results/pretest/golangci-lint.out #remove if golang_lint works
- tmp/spectral_baseline/*.json #what do we need to store for review?
- spectral/*.json #what do we need to store for review?
when: always
# rules:
# - *check_server_ignore_branch

server_test:
stage: test
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env

COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt
Expand All @@ -8,7 +8,7 @@ RUN apt-get install -y ca-certificates --no-install-recommends
RUN update-ca-certificates

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
Expand All @@ -17,7 +17,6 @@ COPY bin/milmove /bin/milmove

COPY config/tls/milmove-cert-bundle.p7b /config/tls/milmove-cert-bundle.p7b
COPY config/tls/dod-sw-ca-75.pem /config/tls/dod-sw-ca-75.pem
COPY config/tls/dod-sw-ca-66.pem /config/tls/dod-sw-ca-66.pem

COPY swagger/* /swagger/
COPY build /build
Expand All @@ -31,4 +30,4 @@ ENTRYPOINT ["/bin/milmove"]

CMD ["serve", "--logging-level=debug"]

EXPOSE 8080
EXPOSE 8080
11 changes: 3 additions & 8 deletions Dockerfile.dp3
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348

#AWS GovCloud RDS cert
COPY bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
Expand All @@ -20,11 +20,6 @@ COPY config/tls/api.loadtest.dp3.us.crt /config/tls/api.loadtest.dp3.us.crt
COPY config/tls/api.exp.dp3.us.chain.der.p7b /config/tls/api.exp.dp3.us.chain.der.p7b
COPY config/tls/api.exp.dp3.us.crt /config/tls/api.exp.dp3.us.crt

#copy dod certs
COPY config/tls/milmove-cert-bundle.p7b /config/tls/milmove-cert-bundle.p7b
COPY config/tls/dod-sw-ca-75.pem /config/tls/dod-sw-ca-75.pem
COPY config/tls/dod-sw-ca-66.pem /config/tls/dod-sw-ca-66.pem

COPY swagger/* /swagger/
COPY build /build
COPY public/static/react-file-viewer /public/static/react-file-viewer
Expand All @@ -37,4 +32,4 @@ ENTRYPOINT ["/bin/milmove"]

CMD ["serve", "--logging-level=debug"]

EXPOSE 8080
EXPOSE 8080
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN rm -f bin/milmove && make bin/milmove
#########

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348

COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.migrations
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env

COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt
Expand All @@ -9,7 +9,7 @@ RUN update-ca-certificates


# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348

COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.reviewapp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ RUN set -x \
#########

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455 as milmove
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348 as milmove

COPY --from=server_builder /build/bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
COPY --from=server_builder /build/bin/milmove /bin/milmove
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.tasks
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env

COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt
Expand All @@ -8,7 +8,7 @@ RUN apt-get install -y ca-certificates --no-install-recommends
RUN update-ca-certificates

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY config/tls/milmove-cert-bundle.p7b /config/tls/milmove-cert-bundle.p7b
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tasks_dp3
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348

# Demo Environment Certs
COPY config/tls/api.demo.dp3.us.chain.der.p7b /config/tls/api.demo.dp3.us.chain.der.p7b
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tasks_local
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN rm -f bin/milmove-tasks && make bin/milmove-tasks
#########

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348

COPY --from=builder --chown=root:root /home/circleci/project/config/tls/milmove-cert-bundle.p7b /config/tls/milmove-cert-bundle.p7b
COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
Expand Down
8 changes: 4 additions & 4 deletions migrations/app/schema/20250106202424_update_duty_locs.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ BEGIN
SELECT '8d613f71-b80e-4ad4-95e7-00781b084c7c'::uuid, 'n/a', NULL, 'NAS NORTH ISLAND', 'CA', '39125', now(), now(), NULL, 'SAN DIEGO', false, '791899e6-cd77-46f2-981b-176ecb8d7098'::uuid, '191165db-d30a-414d-862b-54afdfc7aeb9'::uuid
WHERE NOT EXISTS (select * from addresses where id = '8d613f71-b80e-4ad4-95e7-00781b084c7c');

INSERT INTO duty_locations (id,"name",affiliation,address_id,created_at,updated_at,transportation_office_id,provides_services_counseling)
INSERT INTO duty_locations (id,"name",affiliation,address_id,created_at,updated_at,transportation_office_id,provides_services_counseling)
SELECT '56255626-bbbe-4834-8324-1c08f011f2f6'::uuid,'NAS N Island, CA 92135',NULL,'3d617fab-bf6f-4f07-8ab5-f7652b8e7f3e'::uuid,now(),now(),null,true
WHERE NOT EXISTS (select * from duty_locations where id = '56255626-bbbe-4834-8324-1c08f011f2f6');
INSERT INTO duty_locations (id,"name",affiliation,address_id,created_at,updated_at,transportation_office_id,provides_services_counseling)

INSERT INTO duty_locations (id,"name",affiliation,address_id,created_at,updated_at,transportation_office_id,provides_services_counseling)
SELECT '7156098f-13cf-4455-bcd5-eb829d57c714'::uuid,'NAS North Island, CA 92135',NULL,'8d613f71-b80e-4ad4-95e7-00781b084c7c'::uuid,now(),now(),null,true
WHERE NOT EXISTS (select * from duty_locations where id = '7156098f-13cf-4455-bcd5-eb829d57c714');
END $$;
Expand All @@ -42,7 +42,7 @@ BEGIN
SELECT 'fb90a7df-6494-4974-a0ce-4bdbcaff80c0'::uuid, 'n/a', NULL, 'CANNON AFB', 'NM', '88101', now(), now(), NULL, 'CURRY', false, '791899e6-cd77-46f2-981b-176ecb8d7098'::uuid, '68393e10-1aed-4a51-85a0-559a0a5b0e3f'::uuid
WHERE NOT EXISTS (select * from addresses where id = 'fb90a7df-6494-4974-a0ce-4bdbcaff80c0');

INSERT INTO duty_locations (id,"name",affiliation,address_id,created_at,updated_at,transportation_office_id,provides_services_counseling)
INSERT INTO duty_locations (id,"name",affiliation,address_id,created_at,updated_at,transportation_office_id,provides_services_counseling)
SELECT '98beab3c-f8ce-4e3c-b78e-8db614721621'::uuid, 'Cannon AFB, NM 88101',null, 'fb90a7df-6494-4974-a0ce-4bdbcaff80c0'::uuid,now(),now(),'80796bc4-e494-4b19-bb16-cdcdba187829',true
WHERE NOT EXISTS (select * from duty_locations where id = '98beab3c-f8ce-4e3c-b78e-8db614721621');
END $$;
Expand Down
54 changes: 27 additions & 27 deletions migrations/app/schema/20250121184450_upd_duty_loc_B-22242.up.sql
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
DO $$
BEGIN

--remove duty loc Johnston City, TN 37602
IF EXISTS (SELECT 1 FROM duty_locations WHERE id = 'd3a1be10-dcd7-4720-bcbe-7ba76d243687') THEN


update orders set origin_duty_location_id = 'cd0c7325-15bb-45c7-a690-26c56c903ed7' where origin_duty_location_id = 'd3a1be10-dcd7-4720-bcbe-7ba76d243687';
update orders set new_duty_location_id = 'cd0c7325-15bb-45c7-a690-26c56c903ed7' where new_duty_location_id = 'd3a1be10-dcd7-4720-bcbe-7ba76d243687';

delete from duty_locations where id = 'd3a1be10-dcd7-4720-bcbe-7ba76d243687';

END IF;

END $$;

DO $$
BEGIN

--remove duty loc Oceanside, CA 92052
IF EXISTS (SELECT 1 FROM duty_locations WHERE id = '54ca99b7-3c2a-42b0-aa1a-ad071ac580de') THEN

update orders set origin_duty_location_id = 'a6993e7b-4600-44b9-b288-04ca011143f0' where origin_duty_location_id = '54ca99b7-3c2a-42b0-aa1a-ad071ac580de';
update orders set new_duty_location_id = 'a6993e7b-4600-44b9-b288-04ca011143f0' where new_duty_location_id = '54ca99b7-3c2a-42b0-aa1a-ad071ac580de';

delete from duty_locations where id = '54ca99b7-3c2a-42b0-aa1a-ad071ac580de';

END IF;

END $$;
Expand All @@ -34,9 +34,9 @@ BEGIN

--remove duty loc Albuquerque, NM 87103
IF EXISTS (SELECT 1 FROM duty_locations WHERE id = '2cc57072-19fa-438b-a44b-e349dff11763') THEN

update orders set new_duty_location_id = '54acfb0e-222b-49eb-b94b-ccb00c6f529c' where new_duty_location_id = '2cc57072-19fa-438b-a44b-e349dff11763';

delete from duty_locations where id = '2cc57072-19fa-438b-a44b-e349dff11763';

END IF;
Expand All @@ -45,45 +45,45 @@ END $$;

DO $$
BEGIN

--remove duty loc August, GA 30917
IF EXISTS (SELECT 1 FROM duty_locations WHERE id = '109ac405-47fb-4e1e-9efb-58290453ac09') THEN

update orders set origin_duty_location_id = '595363c2-14ee-48e0-b318-e76ab0016453' where origin_duty_location_id = '109ac405-47fb-4e1e-9efb-58290453ac09';
update orders set new_duty_location_id = '595363c2-14ee-48e0-b318-e76ab0016453' where new_duty_location_id = '109ac405-47fb-4e1e-9efb-58290453ac09';

delete from duty_locations where id = '109ac405-47fb-4e1e-9efb-58290453ac09';

END IF;

END $$;

DO $$
BEGIN

--remove duty loc Frankfort, KY 40602
IF EXISTS (SELECT 1 FROM duty_locations WHERE id = 'c7fadaa2-902f-4302-a7cd-108c525b96d4') THEN

update orders set origin_duty_location_id = '1a973257-cd15-42a9-86be-a14796c014bc' where origin_duty_location_id = 'c7fadaa2-902f-4302-a7cd-108c525b96d4';
update orders set new_duty_location_id = '1a973257-cd15-42a9-86be-a14796c014bc' where new_duty_location_id = 'c7fadaa2-902f-4302-a7cd-108c525b96d4';

delete from duty_locations where id = 'c7fadaa2-902f-4302-a7cd-108c525b96d4';

END IF;

END $$;

DO $$
BEGIN

--remove duty loc Seattle, WA 98111
IF EXISTS (SELECT 1 FROM duty_locations WHERE id = '2fb3e898-d6de-4be7-8576-7c7b10c2a706') THEN

update orders set origin_duty_location_id = 'e7fdae4f-6be7-4264-99f8-03ee8541499c' where origin_duty_location_id = '2fb3e898-d6de-4be7-8576-7c7b10c2a706';
update orders set new_duty_location_id = 'e7fdae4f-6be7-4264-99f8-03ee8541499c' where new_duty_location_id = '2fb3e898-d6de-4be7-8576-7c7b10c2a706';

delete from duty_locations where id = '2fb3e898-d6de-4be7-8576-7c7b10c2a706';

END IF;

END $$;
Expand All @@ -99,23 +99,23 @@ BEGIN
VALUES('23d3140b-1ba2-400f-9d57-317034673c06'::uuid, 'n/a', 'JOINT BASE LEWIS MCCHORD', 'WA', '98438', now(),now(), 'PIERCE', false, '791899e6-cd77-46f2-981b-176ecb8d7098'::uuid, '81182dd4-1693-4b8d-9b6f-042bc4254019'::uuid);

END IF;

IF NOT EXISTS (SELECT 1 FROM duty_locations WHERE id = '109ac405-47fb-4e1e-9efb-58290453ac09') THEN

INSERT INTO public.duty_locations
(id, "name", affiliation, address_id, created_at, updated_at, transportation_office_id, provides_services_counseling)
VALUES('38fc6718-b80f-4761-a077-cfa62e414e27', 'Joint Base Lewis McChord, WA 98438', 'AIR_FORCE', '23d3140b-1ba2-400f-9d57-317034673c06'::uuid, now(), now(), '95abaeaa-452f-4fe0-9264-960cd2a15ccd', true);

END IF;

IF NOT EXISTS (SELECT 1 FROM duty_locations WHERE id = '693781f4-d011-4925-a492-aa1185f3f1fe') THEN

INSERT INTO public.duty_locations
(id, "name", affiliation, address_id, created_at, updated_at, transportation_office_id, provides_services_counseling)
VALUES('693781f4-d011-4925-a492-aa1185f3f1fe'::uuid, 'McChord AFB, WA 98438', 'AIR_FORCE', 'cc7894e3-148e-4e21-98df-37e45f0b2c9f'::uuid, now(), now(), '95abaeaa-452f-4fe0-9264-960cd2a15ccd', true);

END IF;

END $$;

--associate duty loc Yuma, AZ 85365 to transportation office PPPO DMO MCAS Yuma - USMC
Expand Down
28 changes: 19 additions & 9 deletions pkg/models/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,28 @@ func (m Move) GetDestinationGBLOC(db *pop.Connection) (string, error) {

var newGBLOC string
if *destinationAddress.IsOconus {
err := db.Load(&m.Orders, "ServiceMember")
if err != nil {
if err.Error() == RecordNotFoundErrorString {
return "", errors.WithMessage(err, "No Service Member found in the DB associated with moveID "+m.ID.String())
if m.OrdersID != uuid.Nil {
err := db.Q().EagerPreload("ServiceMember").
Find(&m.Orders, m.OrdersID)
if err != nil {
if errors.Cause(err).Error() == RecordNotFoundErrorString {
return "", ErrFetchNotFound
}
return "", err
}
return "", err
} else {
return "", errors.WithMessage(ErrInvalidOrderID, "Orders ID must have a value in order to get the destination GBLOC")
}
newGBLOCOconus, err := FetchAddressGbloc(db, *destinationAddress, m.Orders.ServiceMember)
if err != nil {
return "", err

if m.Orders.ServiceMember.Affiliation != nil {
newGBLOCOconus, err := FetchAddressGbloc(db, *destinationAddress, m.Orders.ServiceMember)
if err != nil {
return "", err
}
newGBLOC = *newGBLOCOconus
} else {
return "", errors.Errorf("ServiceMember.Affiliation cannot be NULL for GetDestinationGBLOC")
}
newGBLOC = *newGBLOCOconus
} else {
newGBLOCConus, err := FetchGBLOCForPostalCode(db, destinationAddress.PostalCode)
if err != nil {
Expand Down
Loading

0 comments on commit d9e138c

Please sign in to comment.