-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add backend support for ownership requests #740
base: master
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.
Off to a great start! Left some comments; feel free to reply/reach out with any questions. Please also add some test cases when you get a chance 🙂
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.
Thanks for the PR, this looks like a great start! Rohan was (very) thorough, not much to add. One last nit: consider updating the PR's title and description to be a little more descriptive. (Take a look at past PRs for examples.) It's a small detail, but when you're reviewing code years in the future, it's great to understand what the author was thinking.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #740 +/- ##
==========================================
+ Coverage 71.95% 72.60% +0.64%
==========================================
Files 32 32
Lines 6953 7055 +102
==========================================
+ Hits 5003 5122 +119
+ Misses 1950 1933 -17 ☔ View full report in Codecov by Sentry. |
8808888
to
d5e4b6c
Compare
… viewing membership requests
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.
Thanks for resolving the comments from earlier! Left a few more, but mostly looks good to me!
backend/clubs/migrations/0119_rename_withdrew_ownershiprequest_withdrawn_and_more.py
Outdated
Show resolved
Hide resolved
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.
Great work Gabe! Rohan did a great job with his review, so not much to add outside of minor comments.
…equest models and combine migration files
…lizer already in model
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.
lgtm aside from a few nits! sorry for taking so long to get to this
@@ -1077,49 +1077,89 @@ def __str__(self): | |||
return "<SearchQuery: {} at {}>".format(self.query, self.created_at) | |||
|
|||
|
|||
class MembershipRequest(models.Model): | |||
class Request(models.Model): |
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.
nit: something more descriptive like JoinRequest
accept: | ||
Accept an ownership request as a club owner. | ||
|
||
old_requests: |
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.
nit: make this consistent with the new route
request_object.delete() | ||
return Response({"success": True}) | ||
|
||
@action(detail=False, methods=["get"], permission_classes=[IsSuperuser]) | ||
def all_requests(self, request, *args, **kwargs): |
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.
nit: all
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.
LGTM! Thanks for fixing up the tests.
Implement backend for new Ownership Requests feature and update Membership Request feature.
New:
Modified: