Proper unique index name when using db_field.
This commit is contained in:
parent
9540555b26
commit
dcc8d22cec
1 changed files with 1 additions and 1 deletions
|
|
@ -269,7 +269,7 @@ class TopLevelDocumentMetaclass(DocumentMetaclass):
|
|||
# Generate a list of indexes needed by uniqueness constraints
|
||||
if field.unique:
|
||||
field.required = True
|
||||
unique_fields = [field_name]
|
||||
unique_fields = [field.db_field]
|
||||
|
||||
# Add any unique_with fields to the back of the index spec
|
||||
if field.unique_with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue