Merged
Conversation
Contributor
Author
|
Oh, I see that I forgot to generate migration. I will do it tomorrow. |
dybi
approved these changes
Jun 14, 2019
| self.assertTemplateUsed(response, SignUp.template_name) | ||
|
|
||
| def test_signup_view_should_add_new_user_on_post(self): | ||
| response = self._register_user_using_signup_view() |
Contributor
There was a problem hiding this comment.
we could add check, that before post there is no users:
self.assertEqual(CustomUser.objects.all().count(), 0)
Contributor
Author
There was a problem hiding this comment.
You're right :) Done
users/views.py
Outdated
|
|
||
| def activate(self) -> bool: | ||
| user_id = force_text(urlsafe_base64_decode(self.kwargs["encoded_user_id"])) | ||
| user = get_user_or_none(user_id=user_id) |
Contributor
There was a problem hiding this comment.
I would suggest checing if user exist, and return False upon DoesNotExist exception
e7da11f to
c724f5b
Compare
c724f5b to
1718e36
Compare
Contributor
|
@kbeker Why not using |
Contributor
Author
|
@rwrzesien To be honest - I didn't know about this. You think that now it is worth to change it into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No issue for that.