crucialfelix/django-ajax-selects — pull request #78 by AlexHill (2014-05-20 07:53:17+00:00)
Title: Support non-int primary keys

Currently, ``LookupChannel.get_objects()`` uses ``int()`` to parse string PK values. This means that models without an int PK will return nothing, so our form fields don't get initial values set.

This change replaces the call to ``int()`` with a call to ``self.model._meta.pk.to_python()``, which should always return the key in the correct type, ready to be used in an ORM query.

I see some ids are converted to ints in ``value_from_datadict()`` as well - those places might need attention too?