Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Sep 20, 2022
1 parent 1c8be00 commit ccb2951
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ckan/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,16 +731,16 @@ def post(self, id):
if (username is not None and username != u''):
user_dict[u'name'] = username
user_dict[u'reset_key'] = g.reset_key
updated_user = logic.get_action("user_update")(context, user_dict)
updated_user = logic.get_action(u"user_update")(context, user_dict)
# Users can not change their own state, so we need another edit
if (updated_user["state"] == model.State.PENDING):
if (updated_user[u"state"] == model.State.PENDING):
patch_context = {
'user': logic.get_action("get_site_user")(
{"ignore_auth": True}, {})["name"]
u'user': logic.get_action(u"get_site_user")(
{u"ignore_auth": True}, {})[u"name"]
}
logic.get_action("user_patch")(
logic.get_action(u"user_patch")(
patch_context,
{"id": user_dict['id'], "state": model.State.ACTIVE}
{u"id": user_dict[u'id'], u"state": model.State.ACTIVE}
)
mailer.create_reset_key(context[u'user_obj'])
h.flash_success(_(u'Your password has been reset.'))
Expand Down

0 comments on commit ccb2951

Please sign in to comment.