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
Where rating is FloatField and pages is IntegerField.
Django test failure:
======================================================================
ERROR: test_add_implementation (aggregation.tests.AggregateTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.InvalidParameterValue: sum(): unsupported binary operator: <float> + <int>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/tim/code/django/tests/aggregation/tests.py", line 1045, in test_add_implementation
b1 = qs.get(pk=self.b4.pk)
File "/home/tim/code/django/django/db/models/query.py", line 402, in get
num = len(clone)
File "/home/tim/code/django/django/db/models/query.py", line 256, in __len__
self._fetch_all()
File "/home/tim/code/django/django/db/models/query.py", line 1242, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/tim/code/django/django/db/models/query.py", line 55, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1100, in execute_sql
cursor.execute(sql, params)
File "/home/tim/code/django/django/db/backends/utils.py", line 99, in execute
return super().execute(sql, params)
File "/home/tim/code/django/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/tim/code/django/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: sum(): unsupported binary operator: <float> + <int>
The text was updated successfully, but these errors were encountered:
Example query:
Where
rating
isFloatField
andpages
isIntegerField
.Django test failure:
The text was updated successfully, but these errors were encountered: