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
a170dac8
Kaydet (Commit)
a170dac8
authored
Mar 21, 2018
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed too many parentheses in inspectdb Meta.unique_together output.
Regression in
c76d8742
.
üst
bb79e480
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
inspectdb.py
django/core/management/commands/inspectdb.py
+1
-1
tests.py
tests/inspectdb/tests.py
+1
-0
No files found.
django/core/management/commands/inspectdb.py
Dosyayı görüntüle @
a170dac8
...
...
@@ -273,7 +273,7 @@ class Command(BaseCommand):
if
params
[
'unique'
]:
columns
=
params
[
'columns'
]
if
len
(
columns
)
>
1
:
unique_together
.
append
(
'('
+
str
(
tuple
(
column_to_field_name
[
c
]
for
c
in
columns
))
+
')'
)
unique_together
.
append
(
str
(
tuple
(
column_to_field_name
[
c
]
for
c
in
columns
))
)
managed_comment
=
" # Created from a view. Don't remove."
if
is_view
else
""
meta
=
[
""
,
" class Meta:"
,
...
...
tests/inspectdb/tests.py
Dosyayı görüntüle @
a170dac8
...
...
@@ -211,6 +211,7 @@ class InspectDBTestCase(TestCase):
out
=
StringIO
()
call_command
(
'inspectdb'
,
'inspectdb_uniquetogether'
,
stdout
=
out
)
output
=
out
.
getvalue
()
self
.
assertIn
(
" unique_together = (('"
,
output
)
unique_re
=
re
.
compile
(
r'.*unique_together = \((.+),\).*'
)
unique_together_match
=
re
.
findall
(
unique_re
,
output
)
# There should be one unique_together tuple.
...
...
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