laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42834?usp=email )
Change subject: esipa_rest_utils: fix searchCritera.profileClass type conversion ......................................................................
esipa_rest_utils: fix searchCritera.profileClass type conversion
We currently use utils:hex_to_integer to convert the ProfileClass, which is supposedly a string, to integer. However, hex_to_inteteger does not exist and when looking into the related JSON schema definition of we see that the profileClass member is already defined as integer. This means that ProfileClass already arrives as integer and can be used as it is. removing the hex_to_integer call solves the problem.
Change-Id: I4bd223dbef00be9c800539b8d0dc9a84e3e93b73 Related: SYS#8100 --- M src/esipa_rest_utils.erl 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/esipa_rest_utils.erl b/src/esipa_rest_utils.erl index 21fa3b3..efbf985 100644 --- a/src/esipa_rest_utils.erl +++ b/src/esipa_rest_utils.erl @@ -61,7 +61,7 @@ }}; {[{<<"profileClass">>, ProfileClass}]} -> {listProfileInfo, #{ - searchCriteria => {profileClass, utils:hex_to_integer(ProfileClass)}, + searchCriteria => {profileClass, ProfileClass}, tagList => utils:hex_to_binary(TagList) }}; _ -> @@ -76,7 +76,7 @@ {listProfileInfo, #{searchCriteria => {iccid, utils:hex_to_binary(Iccid)}}}; {[{<<"profileClass">>, ProfileClass}]} -> {listProfileInfo, #{ - searchCriteria => {profileClass, utils:hex_to_integer(ProfileClass)} + searchCriteria => {profileClass, ProfileClass} }}; _ -> logger:error("REST: order with bad listProfilesInfo PSMO: ~p~n", [Psmo]),