mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-25 19:52:54 +03:00
AutoSlugField should not use LIKE
This commit is contained in:
parent
ccaacd9026
commit
9d7e3a5655
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user