Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
60156750
Kaydet (Commit)
60156750
authored
Nis 16, 2018
tarafından
Daniel Miller
Kaydeden (comit)
Tim Graham
Nis 16, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29330 -- Fixed crash when pickling BaseExpression.
Regression in
cfff2af0
.
üst
1d5d4867
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
expressions.py
django/db/models/expressions.py
+5
-0
tests.py
tests/expressions/tests.py
+6
-0
No files found.
django/db/models/expressions.py
Dosyayı görüntüle @
60156750
...
...
@@ -153,6 +153,11 @@ class BaseExpression:
if
output_field
is
not
None
:
self
.
output_field
=
output_field
def
__getstate__
(
self
):
state
=
self
.
__dict__
.
copy
()
state
.
pop
(
'convert_value'
,
None
)
return
state
def
get_db_converters
(
self
,
connection
):
return
(
[]
...
...
tests/expressions/tests.py
Dosyayı görüntüle @
60156750
import
datetime
import
pickle
import
unittest
import
uuid
from
copy
import
deepcopy
...
...
@@ -585,6 +586,11 @@ class BasicExpressionsTests(TestCase):
outer
=
Company
.
objects
.
filter
(
pk__in
=
Subquery
(
inner
.
values
(
'pk'
)))
self
.
assertEqual
(
outer
.
get
()
.
name
,
'Test GmbH'
)
def
test_pickle_expression
(
self
):
expr
=
Value
(
1
,
output_field
=
models
.
IntegerField
())
expr
.
convert_value
# populate cached property
self
.
assertEqual
(
pickle
.
loads
(
pickle
.
dumps
(
expr
)),
expr
)
class
IterableLookupInnerExpressionsTests
(
TestCase
):
@classmethod
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment