mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-25 11:42:54 +03:00
Raise IntegrityError if it's not about the slug
This commit is contained in:
parent
d740d442b2
commit
d5ed3ced40
@ -56,9 +56,11 @@ class LocalizedModel(models.Model):
|
|||||||
# field class... we can also not only catch exceptions
|
# field class... we can also not only catch exceptions
|
||||||
# that apply to slug fields... so yea.. this is as
|
# that apply to slug fields... so yea.. this is as
|
||||||
# retarded as it gets... i am sorry :(
|
# retarded as it gets... i am sorry :(
|
||||||
if 'slug' in str(ex):
|
if 'slug' not in str(ex):
|
||||||
if self.retries >= max_retries:
|
raise ex
|
||||||
raise ex
|
|
||||||
|
if self.retries >= max_retries:
|
||||||
|
raise ex
|
||||||
|
|
||||||
self.retries += 1
|
self.retries += 1
|
||||||
return self.save()
|
return self.save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user