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

Commit

Permalink
validate max_connections is an integer
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWair committed Jan 24, 2023
1 parent 24fb6d0 commit 881b46d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duffel_api/api/booking/offer_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _validate_slices(slices):
@staticmethod
def _validate_max_connections(max_connections):
"""Validate the max connection number"""
if max_connections < 0:
if not isinstance(max_connections, int) or max_connections < 0:
raise OfferRequestCreate.InvalidMaxConnectionValue(max_connections)

def return_offers(self):
Expand Down

0 comments on commit 881b46d

Please sign in to comment.