AutoSlugField should not use LIKE

This commit is contained in:
Swen Kooij 2017-01-10 15:10:41 +02:00
parent ccaacd9026
commit 9d7e3a5655

View File

@ -78,7 +78,7 @@ class LocalizedAutoSlugField(LocalizedField):
"""Gets whether the specified slug is unique.""" """Gets whether the specified slug is unique."""
unique_filter = { unique_filter = {
'%s__%s__contains' % (self.name, language): slug '%s__%s' % (self.name, language): slug
} }
return not type(instance).objects.filter(**unique_filter).exists() return not type(instance).objects.filter(**unique_filter).exists()