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
6e3ac5f4
Kaydet (Commit)
6e3ac5f4
authored
Haz 16, 2014
tarafından
Andrew Godwin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22847: Optimizer wasn't expecting unresolved FKs
üst
067b9668
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
optimizer.py
django/db/migrations/optimizer.py
+7
-4
No files found.
django/db/migrations/optimizer.py
Dosyayı görüntüle @
6e3ac5f4
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
from
django.db
import
migrations
from
django.db
import
migrations
from
django.utils
import
six
class
MigrationOptimizer
(
object
):
class
MigrationOptimizer
(
object
):
...
@@ -205,10 +206,12 @@ class MigrationOptimizer(object):
...
@@ -205,10 +206,12 @@ class MigrationOptimizer(object):
# Don't allow optimisations of FKs through models they reference
# Don't allow optimisations of FKs through models they reference
if
hasattr
(
other
.
field
,
"rel"
)
and
other
.
field
.
rel
:
if
hasattr
(
other
.
field
,
"rel"
)
and
other
.
field
.
rel
:
for
between
in
in_between
:
for
between
in
in_between
:
if
between
.
references_model
(
if
isinstance
(
other
.
field
.
rel
.
to
,
six
.
string_types
):
other
.
field
.
rel
.
to
.
_meta
.
object_name
,
object_name
,
app_label
=
other
.
field
.
rel
.
to
.
split
(
"."
,
1
)
other
.
field
.
rel
.
to
.
_meta
.
app_label
,
else
:
):
object_name
=
other
.
field
.
rel
.
to
.
_meta
.
object_name
app_label
=
other
.
field
.
rel
.
to
.
_meta
.
app_label
if
between
.
references_model
(
object_name
,
app_label
):
return
None
return
None
# OK, that's fine
# OK, that's fine
return
[
return
[
...
...
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