Don't set primary key unconditionally for every model #867
Labels
api: spanner
Issues related to the googleapis/python-spanner-django API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
We are setting primary key unconditionally here which was leading to many test failures (and is an actual issue).
We have overcame this issue for passing different tests by commenting the code but we need to make the proper fix
For a model definition where Django would normally think that the default is NOT_PROVIDED, we set a different default. That again causes Django to behave differently here
If the pk.default had been NOT_PROVIDED (as Django expects when a normal generated primary key is being used), then force_insert=True had not been set
Please see more details here https://code.djangoproject.com/ticket/33052.
The text was updated successfully, but these errors were encountered: