-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fix Bugs when profile is being viewed #1171
Comments
@brylie and @gorkemarslan I'd like to take this issue |
@AbhijithGanesh please remember to complete your currently assigned tasks before starting a new task. |
Yeah but #1151 is dependent on this issue's patch, otherwise I would not be able to load the templates |
@AbhijithGanesh, the error is caused by this line: OpenCiviWiki/project/accounts/views.py Line 180 in ab96113
We should change OpenCiviWiki/project/accounts/models.py Lines 94 to 95 in ab96113
In the end, we should have: try:
user = User.objects.get(username=username)
except User.DoesNotExist:
return HttpResponseRedirect("/404")
form = ProfileEditForm(
initial={
"username": user.username,
"email": user.email,
"first_name": user.profile.first_name or None,
"last_name": user.profile.last_name or None,
"about_me": user.profile.about_me or None,
},
readonly=True,
) If you, you can close PR #1172 and commit these changes in PR #1180. Or I can commit them. |
@AbhijithGanesh, could you look at my previous answer? I guess you missed it. 😄 |
@gorkemarslan I will |
@AbhijithGanesh, I just committed the changes that I suggested. Since the issue affects the backend and the solution is simple, I decided to make changes as soon as possible. |
Description
The serialization is not correct when the registered user tries to view their own profile
This comes from the serialization part of our code-base which can be viewed here
What should have happened?
The serialization should return user appropriately
What browser(s) are you seeing the problem on?
Chrome, Firefox, Microsoft Edge, Safari
Further details
The text was updated successfully, but these errors were encountered: