Raise IntegrityError if it's not about the slug

This commit is contained in:
Swen Kooij 2017-02-02 17:08:06 +02:00
parent d740d442b2
commit d5ed3ced40

View File

@ -56,7 +56,9 @@ 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 'slug' not in str(ex):
raise ex
if self.retries >= max_retries:
raise ex