-
Notifications
You must be signed in to change notification settings - Fork 10
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
Serve SharePoint documents from generic view #5989
Serve SharePoint documents from generic view #5989
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5989 +/- ##
==========================================
+ Coverage 96.64% 96.65% +0.01%
==========================================
Files 1085 1089 +4
Lines 25486 25580 +94
Branches 1687 1690 +3
==========================================
+ Hits 24630 24724 +94
Misses 699 699
Partials 157 157 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Looks good, small suggestion to move test utility functions into the tests folders.
Description of change
Users wish to see all files/documents relating to a company under a new "files" tab on the company overview page. The caveat is this collection list should show files of various types: those in SharePoint, those uploaded to an S3 bucket, and maybe others in the future.
This PR adds a model for a
SharePointDocument
(as we are focusing on this type for the MVP), as well as aGenericDocument
which has generic relations to the type-specific document model, and the related object, which in this instance is a Company. However, this may be extended to InvestmentProject's, or other models, in the future.It also adds a serializer and viewset to enable the retrieval of one or multiple GenericDocument instances, along with the ability to sort the results on the
created_on
field, and filter them byrealted_object_id
.Checklist
Has this branch been rebased on top of the current
main
branch?Explanation
The branch should not be stale or have conflicts at the time reviews are requested.
Is the CircleCI build passing?
General points
Other things to check
fixtures/test_data.yaml
is maintained when updating modelsSee docs/CONTRIBUTING.md for more guidelines.