You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
Package version: Django 3.2.2 and 3.2.9 with django-cloud-spanner 3.0.0 and google-cloud spanner 3.12.0
Steps to reproduce
Follow the "from scratch" documentation as outlined in the readme to the letter
Instantiate and save a model, e.g.: a = MyModel.objects.create(name="testname")
Try to delete the model with: a.delete()
This will trigger the following error:
/Users/me/.pyenv/versions/3.8.9/envs/spannertest/lib/python3.8/site-packages/django/db/backends/utils.py:22: UserWarning: The `rowcount` property is non-operational. Request resulting rows are streamed by the `fetch*()` methods and can't be counted before they are all streamed.
cursor_attr = getattr(self.cursor, attr)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/me/.pyenv/versions/3.8.9/envs/spannertest/lib/python3.8/site-packages/django/db/models/base.py", line 954, in delete
return collector.delete()
File "/Users/me/.pyenv/versions/3.8.9/envs/spannertest/lib/python3.8/site-packages/django/db/models/deletion.py", line 396, in delete
count = sql.DeleteQuery(model).delete_batch([instance.pk], self.using)
File "/Users/me/.pyenv/versions/3.8.9/envs/spannertest/lib/python3.8/site-packages/django/db/models/sql/subqueries.py", line 43, in delete_batch
num_deleted += self.do_query(self.get_meta().db_table, self.where, using=using)
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
A similar error will be raised when trying to update the model: a.name = "new name" & a.save().