Skip to content

Commit

Permalink
Merge branch 'release/1.9.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
hedleyroos committed Apr 27, 2016
2 parents 7b2fe24 + 7c8f092 commit 7129e40
Show file tree
Hide file tree
Showing 3 changed files with 9 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
=========

1.9.1
-----
#. Fix case where an empty list of fields is passed resulting in a blank form.

1.9
---
#. Include fields that are non-editable as potential filter fields.
Expand Down
5 changes: 4 additions & 1 deletion export/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def __init__(self, model, *args, **kwargs):
for field in model._meta.fields:
field.editable = True
# "fields_for_model" erroneously calls a list of fieldnames "fields".
form_fields = forms.models.fields_for_model(model, fields=fieldnames)
if fieldnames:
form_fields = forms.models.fields_for_model(model, fields=fieldnames)
else:
form_fields = forms.models.fields_for_model(model)
for field in model._meta.fields:
name = field.name
if name not in form_fields.keys():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='django-export',
version='1.9',
version='1.9.1',
description='Django app allowing for filtered exporting of model data.',
long_description=open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
author='Praekelt Consulting',
Expand Down

0 comments on commit 7129e40

Please sign in to comment.