Skip to content

Commit

Permalink
add username to the context
Browse files Browse the repository at this point in the history
  • Loading branch information
TomeCirun committed Jan 9, 2024
1 parent 8a920db commit 74f8bb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/logic/action/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,9 @@ def user_create(context: Context,
model.repo.commit()

if with_apitoken:
if not context['user']:
context["user"] = user.name

# Create apitoken for user.
api_token = _get_action("api_token_create")(
context, {"user": user.name, "name": "default"}
Expand Down

0 comments on commit 74f8bb0

Please sign in to comment.