-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Fixes #1758 #1766] Fix for DRF API filters #1767
Merged
Merged
Conversation
This file contains 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
Contributor
KasperBrandt
commented
Aug 25, 2015
- Fixes Multiple filters with same parameter on DRF API #1766: Fix multiple filters on one DRF resource
- Fixes RSR API - filter by organisation #1758: Allow organisation filter for project updates resource
The PartnerType model was used to limit the types of partners that could be added by an organisation. This is now obsolete.
Simplificate the code, remove duplicate listing of partner type and fix punctuation and capitalization.
Partnership.partner_type Initial sweep of the code to move uses of partner_type to the new field iati_organisation_role. Missing is the migration to create the new field. I'm having problems that seem reated to multiple import paths.
The import of Partnership in iati/elements/participating_org.py at the module level causes a runtime error when trying to create a new migration for the Partnership model. Fix by moving the import into the function where it's used.
Also revert imports of Partnership that were changed when trying to fix the dual import problem.
Remove filtering key/value from PartnershipResource.Meta.filtering Add comment to Partnership model
A number of keywords are duplicates in fuction. This migration looks for the "old" keywords and replaces them with the "new" one.
Add some more diagnostic output Fix label characters
Keywords that aren't used in any project are deleted.
To prepare for the removal of sponsor partners, create a keyword for each organisation that is a sposor partner. The keywords are of the format <org ID>:<org name> to distinguish them from "ordinary" keywords.
Enable filtering on legacy Partnership.partner_type(_2) values in the Tastypie PartnershipResource NOTE: when the Partnership.partner_type field is removed, all references to partner_type_2 should be changed to partner_type
Checklist
|
KasperBrandt
changed the title
[#1758 #1766] Fix for DRF API filters
[Fixes #1758 #1766] Fix for DRF API filters
Aug 26, 2015
- Renamed partner_type_2 to partner_type - Changed the backwards compatible Extending partner to 'extending', since converting this to a support partner isn't completely correct. Also, it gave issues when trying to filter on 'support' in the API, since it then only returns the partners with the accountable role and not extending. 'Extending' isn't fully backwards compatible though, because this type didn't exist before, but only new partner could have this type.
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.