Skip to content

Commit

Permalink
Update api token creation command
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Aug 16, 2023
1 parent 314229a commit 6eb46d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/profile/manifests/userportal.pp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
returns => [0, 1], # ignore error if user already exists
}

$api_token_command = "echo 'from rest_framework.authtoken.models import Token; Token.objects.filter(user_id=1).update(key='${root_api_token}')' | manage.py shell"
$api_token_command = "echo 'from rest_framework.authtoken.models import Token; Token.objects.create(user_id=1); Token.objects.filter(user_id=1).update(key='${root_api_token}')' | manage.py shell"
exec { 'userportal_api_token':
command => Sensitive($api_token_command),
subscribe => [
Expand Down

0 comments on commit 6eb46d8

Please sign in to comment.