2👍
✅
It may be that you are not converting passenger_number
to an integer so the comparison operators are comparing between a string and an integer.
>>> "5" < 8
False
>>> "5" > 8
True
So try something like num_passengers = int(instance.passenger_number)
and then do your comparisons against that instead.
Source:stackexchange.com