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
ca874b2f
Kaydet (Commit)
ca874b2f
authored
Eki 10, 2013
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed an undefined variable and clarified the purpose of a test.
refs #4459.
üst
adedc310
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
models.py
tests/serializers_regress/models.py
+7
-4
No files found.
tests/serializers_regress/models.py
Dosyayı görüntüle @
ca874b2f
...
...
@@ -244,10 +244,14 @@ class AutoNowDateTimeData(models.Model):
class
ModifyingSaveData
(
models
.
Model
):
data
=
models
.
IntegerField
(
null
=
True
)
def
save
(
self
):
"A save method that modifies the data in the object"
def
save
(
self
,
*
args
,
**
kwargs
):
"""
A save method that modifies the data in the object.
Verifies that a user-defined save() method isn't called when objects
are deserialized (#4459).
"""
self
.
data
=
666
super
(
ModifyingSaveData
,
self
)
.
save
(
raw
)
super
(
ModifyingSaveData
,
self
)
.
save
(
*
args
,
**
kwargs
)
# Tests for serialization of models using inheritance.
# Regression for #7202, #7350
...
...
@@ -282,4 +286,3 @@ class LengthModel(models.Model):
def
__len__
(
self
):
return
self
.
data
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