-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix: Allow requester indies to retrieve school #147
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @faucomte97)
codeforlife/user/views/school_test.py
line 75 at r1 (raw file):
to join. """ user = IndependentUser.objects.get(username="indy.requester@email.com")
to make the code more resilient and readable, get the first instance of an object that matches your testing conditions.
generally not good practice to refer to test data by a unique identifier and assume the data meets the conditions your test needs.
user = IndependentUser.objects.filter(...an indy user that is requesting to join a class...).first()
codeforlife/user/views/school.py
line 35 at r1 (raw file):
user = self.request.auth_user if user.student: if user.student.class_field:
no need to do this if check. delete this if check and then put the if check: if user.student.pending_class_request:
before this return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @SKairinos)
codeforlife/user/views/school.py
line 35 at r1 (raw file):
Previously, SKairinos (Stefan Kairinos) wrote…
no need to do this if check. delete this if check and then put the if check:
if user.student.pending_class_request:
before this return.
Done.
codeforlife/user/views/school_test.py
line 75 at r1 (raw file):
Previously, SKairinos (Stefan Kairinos) wrote…
to make the code more resilient and readable, get the first instance of an object that matches your testing conditions.
generally not good practice to refer to test data by a unique identifier and assume the data meets the conditions your test needs.
user = IndependentUser.objects.filter(...an indy user that is requesting to join a class...).first()
Done.
This change is