Skip to content

Commit

Permalink
do not send empty application-vars (2600hz#4696)
Browse files Browse the repository at this point in the history
fix route_resp_cavs spec

fix route_resp_cavs return

try using readlink for abs paths
  • Loading branch information
lazedo authored and jamesaimonetti committed Mar 26, 2018
1 parent e8d21ca commit 82caccf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,25 @@ jobs:
# Test
# This would typically be a build job when using workflows, possibly combined with build
# This is based on your 1.0 configuration file or project settings
- run: echo -e "\nexport CHANGED=\"$(git --no-pager diff --name-only HEAD origin/master -- applications core)\"\nexport CHANGED_SWAGGER=\"$(git --no-pager diff --name-only HEAD origin/master -- applications/crossbar/priv/api/swagger.json)\"\n" >> $BASH_ENV
- run: echo -e "\nexport CHANGED=$(git --no-pager diff --name-only HEAD origin/master -- applications core | xargs readlink -e)\nexport CHANGED_SWAGGER=$(git --no-pager diff --name-only HEAD origin/master -- applications/crossbar/priv/api/swagger.json | xargs readlink -e)\n" >> $BASH_ENV
- run: echo $CHANGED
- run: ./scripts/state-of-docs.sh || true
- run: ./scripts/code_checks.bash $($CHANGED)
- run: ./scripts/code_checks.bash $CHANGED
- run: make fmt
- run: JOBS="2" make
- run: make code_checks
- run: make app_applications
- run: ./scripts/validate-js.sh $($CHANGED)
- run: ./scripts/validate-js.sh $CHANGED
- run: make apis
- run: make docs
- run: make validate-schemas
- run: ./scripts/state-of-edoc.escript
- run: make xref
- run: make sup_completion
- run: |
if [[ ! -z "$($CHANGED)" ]]; then
if [[ ! -z "$CHANGED" ]]; then
make build-plt
TO_DIALYZE="$(echo $($CHANGED))" make dialyze
TO_DIALYZE="$CHANGED" make dialyze
fi
- run: make elvis
- run: make build-ci-release
Expand Down
7 changes: 4 additions & 3 deletions applications/ecallmgr/src/ecallmgr_fs_xml.erl
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,10 @@ route_resp_ccvs(JObj) ->

-spec route_resp_cavs(kz_json:object()) -> kz_types:xml_els().
route_resp_cavs(JObj) ->
case kz_json:get_json_value(<<"Custom-Application-Vars">>, JObj) of
'undefined' -> [];
CAVs -> [action_el(<<"kz_multiset">>, route_cavs_list(kz_json:to_proplist(CAVs)))]
CAVs = kz_json:get_json_value(<<"Custom-Application-Vars">>, JObj, kz_json:new()),
case kz_json:to_proplist(CAVs) of
[] -> [];
Props -> [action_el(<<"kz_multiset">>, route_cavs_list(Props))]
end.

-spec route_ccvs_list(kz_term:proplist()) -> kz_term:ne_binary().
Expand Down

0 comments on commit 82caccf

Please sign in to comment.