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
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.SyntaxError: subquery must return only one column
LINE 1: ...query", "eligible_team_query") VALUES ('u17', '', (SELECT "p...
I'm afraid there's very little we'll be able to do as we want to keep allowing the usage of expressions in Field.default. In other words special casing expressions in PickledObjectField.get_default would prevent stuff like default=F('other_pickled_field'). Django 3.0 just happened to make django.db.models.sql.Query an expression which is what causing your crash here.
charettes
changed the title
Queryset.query not pickled correctly when saving PickledObjectField
Queryset.query not pickled correctly when saving PickledObjectField since Django 3.0
Feb 20, 2020
trying to pickle a Query object.
it seems like the default values is not being serialized:
DB is postgres 10.1
django 3.0.3
python 3.7.4
eligible_team_query = PickledObjectField(default=Team.objects.all().query)
Originally posted by @flokain in #47 (comment)
The text was updated successfully, but these errors were encountered: