diff --git a/selectable/base.py b/selectable/base.py index 9570a19..534a4a6 100644 --- a/selectable/base.py +++ b/selectable/base.py @@ -154,6 +154,10 @@ def get_item(self, value): item = self.get_queryset().get(pk=value) except (ValueError, self.model.DoesNotExist): item = None + try: # Check the rest of the values before returning None + item = self.model.objects.get(pk=value) + except (ValueError, self.model.DoesNotExist): + pass return item def create_item(self, value):