mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-25 03:32:55 +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
|
||||
# that apply to slug fields... so yea.. this is as
|
||||
# retarded as it gets... i am sorry :(
|
||||
if 'slug' in str(ex):
|
||||
if self.retries >= max_retries:
|
||||
raise ex
|
||||
if 'slug' not in str(ex):
|
||||
raise ex
|
||||
|
||||
if self.retries >= max_retries:
|
||||
raise ex
|
||||
|
||||
self.retries += 1
|
||||
return self.save()
|
||||
|
Loading…
x
Reference in New Issue
Block a user