Skip to content

Commit

Permalink
Merge pull request #42 from HBS-HBX/stack_trace_when_indexing_in_py3_#41
Browse files Browse the repository at this point in the history
fix #41 stack trace when indexing in py3 and bump version to 0.7.7
  • Loading branch information
codekiln authored Sep 17, 2018
2 parents 8657f71 + c870f0b commit e6880a8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
---------

0.7.7 (2018-09-17)
~~~~~~~~~~~~~~~~~~
* fix `#41 stack trace when indexing in py3 <https://github.com/HBS-HBX/django-elastic-migrations/issues/41>`_

0.7.6 (2018-09-11)
~~~~~~~~~~~~~~~~~~
* fix `#36 es_update --start flag broken <https://github.com/HBS-HBX/django-elastic-migrations/issues/39>`_
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,12 @@ $ ./manage.py loaddata tests/myfixture.json
Installed 101 object(s) from 1 fixture(s)
```
There are already 100 films available using `loaddata` as follows:
```
$ ./manage.py loaddata tests/100films.json
```
### Running Tests Locally
Run `make test`. To run all tests and quality checks locally,
Expand Down
2 changes: 1 addition & 1 deletion django_elastic_migrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from django_elastic_migrations.utils import loading
from django_elastic_migrations.utils.django_elastic_migrations_log import get_logger

__version__ = '0.7.6'
__version__ = '0.7.7'

default_app_config = 'django_elastic_migrations.apps.DjangoElasticMigrationsConfig' # pylint: disable=invalid-name

Expand Down
2 changes: 1 addition & 1 deletion django_elastic_migrations/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def generate_batches(cls, qs=None, batch_size=BATCH_SIZE, total_items=None, upda
try:
qs_ids = list(qs.values_list(cls.PK_ATTRIBUTE, flat=True))
except TypeError as e:
if "values_list() got an unexpected keyword argument 'flat'" in e:
if "values_list() got an unexpected keyword argument 'flat'" in str(e):
qs_ids = [str(id) for id in list(qs.values_list(cls.PK_ATTRIBUTE))]
else:
raise
Expand Down

0 comments on commit e6880a8

Please sign in to comment.