Skip to content
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

Change queryset in project viewset in order to return only projects associated to active organizations. #1755

Merged
merged 13 commits into from
Jan 8, 2020

Conversation

FrankApiyo
Copy link
Member

@FrankApiyo FrankApiyo commented Jan 3, 2020

Changes / Features implemented

Added a filter to the queryset in ProjectViewset to ensure that we do not return projects associated with inactive organizations

Steps taken to verify this change does what is intended

Ran onadata locally and ensured that only projects associated with active organizations are gotten from the projects endpoint

Fixes: #1732

@FrankApiyo FrankApiyo changed the title Issue#1732 Change queryset in project viewset in order to return only projects associated to active organizations. Jan 6, 2020
@FrankApiyo FrankApiyo marked this pull request as ready for review January 6, 2020 15:08
Copy link
Contributor

@ivermac ivermac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that one question, it looks good

created_by=alice_user,
organization=alice_user)
alice_profile.save()
alice_user.save()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we calling .save() on alice_profile and alice_user objects?

ivermac
ivermac previously approved these changes Jan 7, 2020
ivermac
ivermac previously approved these changes Jan 7, 2020
@ivermac ivermac merged commit ed39719 into master Jan 8, 2020
@ivermac ivermac deleted the Issue#1732 branch January 8, 2020 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not return projects tied to inactive organizations
2 participants