Skip to content

Commit

Permalink
prepare 1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed May 21, 2019
1 parent 321b866 commit 2a8948f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

1.7.2
-----
2019-05-21

- Minor fixes in ajax views.

1.7.1
-----
2019-05-21

- Added `ADMIN_TIMELINE_SIMPLE_FILTER_FORM` setting for to be used when
- Added ``ADMIN_TIMELINE_SIMPLE_FILTER_FORM`` setting for to be used when
you have way to many log entries and fetching all content types and users
isn't an option.

Expand Down
8 changes: 7 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

1.7.2
-----
2019-05-21

- Minor fixes in ajax views.

1.7.1
-----
2019-05-21

- Added `ADMIN_TIMELINE_SIMPLE_FILTER_FORM` setting for to be used when
- Added ``ADMIN_TIMELINE_SIMPLE_FILTER_FORM`` setting for to be used when
you have way to many log entries and fetching all content types and users
isn't an option.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from setuptools import setup, find_packages

version = '1.7.1'
version = '1.7.2'

try:
readme = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
Expand Down
2 changes: 1 addition & 1 deletion src/admin_timeline/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'django-admin-timeline'
__version__ = '1.7.1'
__version__ = '1.7.2'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2013-2019 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
15 changes: 9 additions & 6 deletions src/admin_timeline/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,19 @@ def _get_date_from_string(val):
post['users'] = post.pop('users[]')
elif 'users' in post:
post['users'] = post.pop('users')
if SIMPLE_FILTER_FORM:
if post['users']:
post['users'] = post['users'][0]

if SIMPLE_FILTER_FORM:
if 'users' in post and post['users']:
post['users'] = post['users'][0]

if 'content_types[]' in post:
post['content_types'] = post.pop('content_types[]')
elif 'content_types' in post:
post['content_types'] = post.pop('content_types')
if SIMPLE_FILTER_FORM:
if post['content_types']:
post['content_types'] = post['content_types'][0]

if SIMPLE_FILTER_FORM:
if 'content_types' in post and post['content_types']:
post['content_types'] = post['content_types'][0]

filter_form = FilterForm(post)
if filter_form.is_valid():
Expand All @@ -138,6 +140,7 @@ def _get_date_from_string(val):
]
else:
content_types = []

else:
pass # Anything to do here?
else:
Expand Down

0 comments on commit 2a8948f

Please sign in to comment.