Skip to content

Commit

Permalink
remove high coupling request processing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
keeganland committed Aug 28, 2020
1 parent 9c33a32 commit 3866413
Showing 1 changed file with 0 additions and 18 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)

0 comments on commit 3866413

Please sign in to comment.