Skip to content

Commit

Permalink
fix issue when model manager is overridden (#71)
Browse files Browse the repository at this point in the history
* fix issue when model manager is overridden
  • Loading branch information
chinskiy authored Mar 24, 2022
1 parent bf8520b commit d099bb1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dj_anonymizer/anonymizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def anonymize(self, only=None):
setattr(obj, name, next(
getattr(anonym_cls, name))
)
subset.model.objects.bulk_update(
queryset.bulk_update(
subset,
anonym_cls.get_fields_names(),
batch_size=settings.ANONYMIZER_UPDATE_BATCH_SIZE,
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=============

UNRELEASED
----------
* Bugfix: fix issue when model manager is overridden (`#71 <https://github.com/preply/dj_anonymizer/pull/71>`__)

0.5.0
----------
* Feature: add possibility to execute anonymizer only on the specified model (`#69 <https://github.com/preply/dj_anonymizer/pull/69>`__)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.5.0'
release = '0.5.1-beta1'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(*rnames):
name='dj_anonymizer',
packages=['dj_anonymizer'],
include_package_data=True,
version='0.5.0',
version='0.5.1-beta1',
description='This project helps anonymize production database '
+ 'with fake data of any kind.',
long_description=(read('README.md')),
Expand Down

0 comments on commit d099bb1

Please sign in to comment.