Skip to content

Commit

Permalink
[#2784] Set user domain object in 'user_obj' in context instead of 'u…
Browse files Browse the repository at this point in the history
…ser'
  • Loading branch information
amercader committed Aug 3, 2012
1 parent 21ca66c commit d7408ff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ckan/logic/action/create.py
Expand Up @@ -693,10 +693,7 @@ def user_create(context, data_dict):
user_dictize_context['keep_sensitive_data'] = True
user_dict = model_dictize.user_dictize(user, user_dictize_context)

# TODO: I don't know what the need for changing the context is here,
# probably caching of the domain object. But it doesn't seem right given
# that usually context['user'] contains the user who made the request.
context['user'] = user
context['user_obj'] = user
context['id'] = user.id
log.debug('Created user %s' % str(user.name))
return user_dict
Expand Down

0 comments on commit d7408ff

Please sign in to comment.