Skip to content

Commit

Permalink
Merge pull request #3 from ibacher/fix_user
Browse files Browse the repository at this point in the history
Fix /user/ API to load profile for current user
  • Loading branch information
snyaggarwal authored Oct 20, 2020
2 parents ae75a6a + f91c1ae commit 4857053
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/common/management/commands/setup_superuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Command(BaseCommand):
def handle(self, *args, **options):
user = UserProfile.objects.get(username='ocladmin', is_superuser=True)
user.set_password(settings.API_SUPERUSER_PASSWORD)
user.save()
user.set_token(settings.API_SUPERUSER_TOKEN)
user.save()

2 changes: 1 addition & 1 deletion core/users/user_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# shortcuts for the currently logged-in user
urlpatterns = [
re_path(
r'^$', views.UserDetailView.as_view(), name='user-self-detail'
r'^$', views.UserDetailView.as_view(), extra_kwargs, name='user-self-detail'
),
re_path(
r'^orgs/$', orgs_views.OrganizationListView.as_view(), extra_kwargs, name='user-organization-list'
Expand Down

0 comments on commit 4857053

Please sign in to comment.