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
if serializer.validated_data:
from snapshot_queries import snapshot_queries
with snapshot_queries() as queries_executed:
instance = serializer.save()
queries_executed.display()
I am getting the following error:
File "/usr/local/lib/python3.8/contextlib.py", line 74, in inner
with self._recreate_cm():
File "/usr/local/lib/python3.8/site-packages/django/db/transaction.py", line 196, in __enter__
sid = connection.savepoint()
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 332, in savepoint
self._savepoint(sid)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 300, in _savepoint
cursor.execute(self.ops.savepoint_create_sql(sid))
File "/usr/local/lib/python3.8/site-packages/snapshot_queries/snapshot_queries.py", line 171, in execute
return self._record(method=self.cursor.execute, sql=sql, params=params)
File "/usr/local/lib/python3.8/site-packages/snapshot_queries/snapshot_queries.py", line 234, in _record
Query.create(
File "/usr/local/lib/python3.8/site-packages/snapshot_queries/query.py", line 72, in create
location=last_executed_line.location(),
File "/usr/local/lib/python3.8/site-packages/snapshot_queries/stacktrace.py", line 98, in location
loc = f"{Path(self.path).relative_to(Path.cwd())}:{self.line_no}"
File "/usr/local/lib/python3.8/pathlib.py", line 908, in relative_to
raise ValueError("{!r} does not start with {!r}"
ValueError: '/usr/local/lib/python3.8/contextlib.py' does not start with '/webapps/app'
Any help is much appreciated.
The text was updated successfully, but these errors were encountered:
Code in the Django app:
I am getting the following error:
Any help is much appreciated.
The text was updated successfully, but these errors were encountered: