Skip to content

Commit

Permalink
Refs #26167 -- Functional Indexes don't have a fields attribute
Browse files Browse the repository at this point in the history
Referring to that attribute in AddIndex.describe() will thus not work.
The description of an index should instead live in the index class
definition of the index.
  • Loading branch information
MarkusH committed Mar 3, 2017
1 parent 332c98c commit 4d430fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django/db/migrations/operations/models.py
Expand Up @@ -784,9 +784,8 @@ def deconstruct(self):
)

def describe(self):
return 'Create index %s on field(s) %s of model %s' % (
return 'Create index %s for model %s' % (
self.index.name,
', '.join(self.index.fields),
self.model_name,
)

Expand Down

0 comments on commit 4d430fb

Please sign in to comment.