-
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.59% +0.63%
==========================================
Files 32 32
Lines 6953 7056 +103
==========================================
+ Hits 5003 5122 +119
+ Misses 1950 1934 -16 ☔ 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.
backend/clubs/views.py
Outdated
queryset = OwnershipRequest.objects.filter( | ||
withdrawn=False, created_at__lte=timezone.now() - datetime.timedelta(days=7) | ||
) |
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.
@rm03 Do you know why we're limiting this to requests that are a week old? I feel like admins should be able to view all requests. We've had situations where someone needs to take over a club a day before the renewal deadline / Wharton applications / club fair.
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.
The idea was that we give club owners a week to resolve the request before it goes to OSA; if we show all requests to OSA at once, they might resolve the request before the club owners have a chance to address it. This could be problematic in the scenario that you described, so maybe we should show all requests but highlight the ones that are over a week old on the frontend.
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.
Sounds good, definitely agree with the frontend part. @gabeweng do you mind tweaking this to return all requests, and then sort by created_at
so that oldest requests show up first?
…equest models and combine migration files
…lizer already in model
Implement backend for new Ownership Requests feature and update Membership Request feature.
New:
Modified: