Skip to content

Commit

Permalink
changes in redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak5598 committed Mar 2, 2024
1 parent 500ffc2 commit 04541a1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3869,7 +3869,5 @@ def update_bch_address(request):
messages.success(request, 'BCH Address updated successfully.')
except Exception as e:
messages.error(request, 'Failed to update BCH Address.')
if request.user.is_authenticated:
return redirect(reverse('profile', args=[request.user.username]))
else:
return redirect('login') # Or any other URL for non-authenticated users
else:
messages.error(request,'No Update')

0 comments on commit 04541a1

Please sign in to comment.