Skip to content

Commit

Permalink
[TELE-1972]fix patch location room
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Selva committed Oct 1, 2024
1 parent b68446a commit d7d0027
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions passerelle_imio_ia_tech/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def write_reservation_room(
long_description="Modifie le statut d'une réservation de salle dans ATAL.",
display_category="Location de Salles",
display_order=11,
methods=["patch"],
methods=["get"],
parameters={
"room_loan_id": {
"description": "id de la réservation de salle",
Expand All @@ -811,18 +811,17 @@ def update_booking_room(
):
url = f"{self.base_url}/api/RoomLoans?id={room_loan_id}"
headers = {
"accept": "application/json",
"accept": "*/*",
"X-API-Key": self.api_key,
"Content-Type": "application/json",
}
payload = json.dumps({"RequestState": request_state})
payload = json.dumps({"RequestState": int(request_state)})

try:
response = requests.patch(
url,
headers=headers,
data=payload,
verify=False,
)
except RequestException as e:
self.logger.warning(f'ATAL Error: {e}')
Expand Down

0 comments on commit d7d0027

Please sign in to comment.