-
Notifications
You must be signed in to change notification settings - Fork 54
2.4.0 fix multisite not all sites #1488
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9cdc2a2
Do not filter no sites for multisite #1481
MyPyDavid c17a1e1
Simplifiy availability filter
MyPyDavid 8858756
Add catalog filter for user and refactor
MyPyDavid 6fbe9de
Add data migration for catalog.sites in multisite
MyPyDavid 8427adc
Add a CatalogQueryset method for projects
MyPyDavid ccc0e0c
Revert to correct user object in serializer
MyPyDavid a851204
projects(tests): move enable multisite fixture
MyPyDavid ec58221
projects(tests): update viewset catalog
MyPyDavid de9b360
Add projects catalog tests for #1481
MyPyDavid f79a7f1
Also order filtered catalogs by id
MyPyDavid dd38f6d
Do not use list in Catalogs data migration
MyPyDavid 02755ca
Update Catalog manager methods and use subquery in viewset
MyPyDavid 5b33ed7
Refactor QuerysetMixins for Task and View
MyPyDavid ff8ff63
Refactor View and Task managers into ForProjectManager
MyPyDavid cd37b53
Add multisite condition for sites to task or view filter for projects
MyPyDavid 98d5c1e
Update and fix project sync tests
MyPyDavid f197bfb
Add query for catalogs to filter_projects_for_task_or_view
MyPyDavid d1e4e3c
Refactor manager methods into projects.util filter_tasks_or_views_for…
MyPyDavid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Empty file.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import pytest | ||
|
|
||
| from rdmo.questions.models import Catalog | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def clear_sites_from_other_catalogs(settings): | ||
| # arrange, remove sites from the other catalogs | ||
| # for 'list': 'v1-projects:catalog-list' | ||
| # in non-multisite, they should appear | ||
| # however, in a multisite they should not appear | ||
| other_catalogs = Catalog.objects.exclude(sites=settings.SITE_ID) | ||
| assert set(other_catalogs.values_list('id',flat=True)) == {3,4} | ||
| for catalog in other_catalogs: | ||
| catalog.sites.clear() |
Oops, something went wrong.
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.
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.
this is the fix for the issue #1481