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

refactor: Landscape membership list #946

Closed
wants to merge 34 commits into from

Conversation

josebui
Copy link
Contributor

@josebui josebui commented Nov 1, 2023

Description

Landscape is using a group to handle the user memberships in this PR I changed it to use MembershipList to removing the dependency with Group

Checklist

  • Corresponding issue has been opened
  • New tests added

Related Issues

Related PRs

terraso_backend/apps/collaboration/graphql/memberships.py Outdated Show resolved Hide resolved
Comment on lines +57 to +58
def default_validation_func(self):
return False
Copy link
Member

Choose a reason for hiding this comment

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

question: what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paulschreiber The function using this default is the fucntion to save memberships, since the collaboration app doesn't have all the context to enforce the validation a function can be passed from the app using it to add the needed validation, if no function is passed this will be used by default

@@ -25,6 +26,7 @@
)
from apps.core.models.taxonomy_terms import TaxonomyTerm

from ..landscape_collaboration_roles import ROLE_MANAGER
Copy link
Member

Choose a reason for hiding this comment

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

question: can this be done without ..?

@@ -21,6 +21,8 @@
from django.utils.translation import gettext_lazy as _
from safedelete.models import SOFT_DELETE_CASCADE, SafeDeleteManager, SafeDeleteModel

from .. import landscape_collaboration_roles
Copy link
Member

Choose a reason for hiding this comment

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

question: can this be done without a relative path?

terraso_backend/apps/graphql/schema/landscapes.py Outdated Show resolved Hide resolved
terraso_backend/apps/graphql/schema/landscapes.py Outdated Show resolved Hide resolved
terraso_backend/apps/graphql/schema/landscapes.py Outdated Show resolved Hide resolved
@josebui josebui force-pushed the refactor/landscape-group-membership-list branch from 262ed82 to 52a15aa Compare November 10, 2023 16:40
@josebui
Copy link
Contributor Author

josebui commented Nov 22, 2023

Final PR: #997

@josebui josebui closed this Nov 22, 2023
@josebui josebui deleted the refactor/landscape-group-membership-list branch November 22, 2023 18:26
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.

2 participants