import uuid
from django.urls import path
from django.db import models
from iommi import Form
class TestModel(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
class TestModel2(models.Model):
model = models.ForeignKey(TestModel, on_delete=models.CASCADE)
urlpatterns = [path("test/", Form.create(auto__model=TestModel2).as_view())]
if you try to use the select field you get:
TypeError: Object of type UUID is not JSON serializable
Steps to reproduce:
minimal failing example
if you try to use the select field you get:
TypeError: Object of type UUID is not JSON serializable