Skip to content

Commit

Permalink
Merge pull request #984 from ubyssey/orm-managers-fix
Browse files Browse the repository at this point in the history
Orm managers fix
  • Loading branch information
keeganland authored Aug 28, 2020
2 parents 838af5a + 3866413 commit 9ab369e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions dispatch/modules/content/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,4 @@ def get(self, *args, **kwargs):
kwargs['head'] = True
del kwargs['pk']

"""If the url requested includes the querystring parameters 'version' and 'preview_id',
get the article with the specified version and preview_id.
Otherwise, get the published version of the article.
"""

if 'request' in kwargs:
request = kwargs['request']
version = request.GET.get('version', None)
preview_id = request.GET.get('preview_id', None)

if (version is not None) and (preview_id is not None):
kwargs['revision_id'] = version
kwargs['preview_id'] = preview_id
del kwargs['is_published']

del kwargs['request']

return super(PublishableManager, self).get(*args, **kwargs)
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='dispatch',
description='A publishing platform for modern newspapers',
version='1.3.8',
version='1.3.9',
url='https://github.com/ubyssey/dispatch',
author='Peter Siemens',
author_email='[email protected]',
Expand Down

0 comments on commit 9ab369e

Please sign in to comment.