Skip to content

Commit

Permalink
Profile: redirect to /accounts/edit/ view on successful edit (#10610)
Browse files Browse the repository at this point in the history
Closes #10404
  • Loading branch information
humitos authored Aug 8, 2023
1 parent c28e39a commit bbb200b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions readthedocs/profiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def get_object(self):

def get_success_url(self):
return reverse(
'profiles_profile_detail',
kwargs={'username': self.request.user.username},
"profiles_profile_edit",
)


Expand Down
1 change: 1 addition & 0 deletions readthedocs/rtd_tests/tests/test_profile_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_edit_profile(self):
},
)
self.assertTrue(resp.status_code, 200)
self.assertEqual(resp["Location"], "/accounts/edit/")

self.user.refresh_from_db()
self.user.profile.refresh_from_db()
Expand Down

0 comments on commit bbb200b

Please sign in to comment.