1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Fixed #23013 -- Fixed removing unique_together/index_together constraints in migrations.

Thanks melinath for the report.
This commit is contained in:
Tim Graham
2014-07-14 08:16:35 -04:00
parent b65a2001e7
commit 0154965392
3 changed files with 10 additions and 4 deletions

View File

@@ -248,7 +248,7 @@ class AlterUniqueTogether(Operation):
return name.lower() == self.name.lower()
def describe(self):
return "Alter %s for %s (%s constraint(s))" % (self.option_name, self.name, len(self.unique_together))
return "Alter %s for %s (%s constraint(s))" % (self.option_name, self.name, len(self.unique_together or ''))
class AlterIndexTogether(Operation):
@@ -288,7 +288,7 @@ class AlterIndexTogether(Operation):
return name.lower() == self.name.lower()
def describe(self):
return "Alter %s for %s (%s constraint(s))" % (self.option_name, self.name, len(self.index_together))
return "Alter %s for %s (%s constraint(s))" % (self.option_name, self.name, len(self.index_together or ''))
class AlterOrderWithRespectTo(Operation):