Skip to content

Commit

Permalink
Don't update user if it's set to None (non-authenticated pipeline con…
Browse files Browse the repository at this point in the history
…tinuation). Refs #198
  • Loading branch information
omab committed Feb 27, 2014
1 parent 21f462f commit 11f3558
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions social/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ def drop_lists(value):
return out


def partial_pipeline_data(strategy, user, *args, **kwargs):
def partial_pipeline_data(strategy, user=None, *args, **kwargs):
partial = strategy.session_get('partial_pipeline', None)
if partial:
idx, backend, xargs, xkwargs = strategy.partial_from_session(partial)
if backend == strategy.backend.name:
kwargs.setdefault('pipeline_index', idx)
kwargs.setdefault('user', user)
if user: # don't update user if it's None
kwargs.setdefault('user', user)
kwargs.setdefault('request', strategy.request)
xkwargs.update(kwargs)
return xargs, xkwargs
Expand Down

0 comments on commit 11f3558

Please sign in to comment.