2 Commits
2.4 ... 2.5

Author SHA1 Message Date
Swen Kooij
759d03133b Bump version number to 2.5 2017-02-02 17:09:15 +02:00
Swen Kooij
d5ed3ced40 Raise IntegrityError if it's not about the slug 2017-02-02 17:08:06 +02:00
2 changed files with 6 additions and 4 deletions

View File

@@ -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()

View File

@@ -7,7 +7,7 @@ with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
setup(
name='django-localized-fields',
version='2.4',
version='2.5',
packages=find_packages(),
include_package_data=True,
license='MIT License',