In order to get service IDs for the daily reservations/getAll request we do services/getAll and select only the reservable ones.
However, we noticed with one Hotel, that created a reservable service, which was later deleted (I assume service deletion via the MEWS commander, results in services being set to isActive=False) that MeHR crashed since the reservations/getAll returned with:
{'Message': 'Invalid ServiceIds.', 'Details': None}
which was not correctly handled.
Proposed fixes include:
- let the user configure the Service via the config.json (Con: less convenient)
- keep serviceID auto detection, based on "reservable" and add requirement
isActive=True
- when multiple serviceId are detected, execute individual
reservations/getAll calls for each individual serviceId and concatenate the results. This should make MeHR more robust in cases where for some reason the call fails for a certain serviceId.
In order to get service IDs for the daily
reservations/getAllrequest we doservices/getAlland select only the reservable ones.However, we noticed with one Hotel, that created a reservable service, which was later deleted (I assume service deletion via the MEWS commander, results in services being set to
isActive=False) that MeHR crashed since thereservations/getAllreturned with:which was not correctly handled.
Proposed fixes include:
isActive=Truereservations/getAllcalls for each individual serviceId and concatenate the results. This should make MeHR more robust in cases where for some reason the call fails for a certain serviceId.