Open captkirk96 opened 8 months ago
You ran out of the free tier GPT-4 tickets! We no longer support running Sweep with GPT-3.5 as it is too unreliable. Here are your options:
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.
This is an automated message generated by Sweep AI.
Model cluster does not support primary keys that are not of simple types.
If you have a primary key that uses something like this CashField from django's tests that doesn't inherit from one of the basic types known to the DjangoJSONEncoder then you get <Foo object at ...> is not JSON serializable.
The Cash object I linked to inherits from decimal.Decimal but that is because it is only a simple example for testing.
ModelCluster needs to do some sort of is_serializable check at https://github.com/torchbox/django-modelcluster/blob/c72110e7789415196336584c70b2706fe74dbc2d/modelcluster/models.py#L44 and use Field.value_to_string or the like if the object isn't serializable