Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test error - Save with update_fields did not affect any rows. #2951

Open
DonnieBLT opened this issue Nov 19, 2024 · 0 comments
Open

Fix test error - Save with update_fields did not affect any rows. #2951

DonnieBLT opened this issue Nov 19, 2024 · 0 comments

Comments

@DonnieBLT
Copy link
Collaborator

Traceback (most recent call last):
File "/home/runner/.cache/pypoetry/virtualenvs/blt-yuw0N2NF-py3.11/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/BLT/BLT/blt/middleware/ip_restrict.py", line 153, in call
ip_record.save(update_fields=["agent", "count", "path"])
File "/home/runner/.cache/pypoetry/virtualenvs/blt-yuw0N2NF-py3.11/lib/python3.11/site-packages/django/db/models/base.py", line 891, in save
self.save_base(
File "/home/runner/.cache/pypoetry/virtualenvs/blt-yuw0N2NF-py3.11/lib/python3.11/site-packages/django/db/models/base.py", line 997, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pypoetry/virtualenvs/blt-yuw0N2NF-py3.11/lib/python3.11/site-packages/django/db/models/base.py", line 1135, in _save_table
raise DatabaseError("Save with update_fields did not affect any rows.")
django.db.utils.DatabaseError: Save with update_fields did not affect any rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant