jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.1k stars 348 forks source link

BugFix when ID is a UUID #312

Open rhenter opened 3 years ago

rhenter commented 3 years ago

I had a JSON Encode Serialize error when I use a Model with ID as UUID.

    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type UUID is not JSON serializable
rhenter commented 3 years ago

I'll create a test to don't decrease the coverage

manelclos commented 3 years ago

Hi @rhenter, this LGTM, can you please add an example to the test_app using the UUID, it would help a lot to test your changes.