Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 881b46d

Browse files
committed
validate max_connections is an integer
1 parent 24fb6d0 commit 881b46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

duffel_api/api/booking/offer_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _validate_slices(slices):
9292
@staticmethod
9393
def _validate_max_connections(max_connections):
9494
"""Validate the max connection number"""
95-
if max_connections < 0:
95+
if not isinstance(max_connections, int) or max_connections < 0:
9696
raise OfferRequestCreate.InvalidMaxConnectionValue(max_connections)
9797

9898
def return_offers(self):

0 commit comments

Comments
 (0)