-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
ce52296
to
7628137
Compare
def default_validation_func(self): | ||
return False |
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.
question: what is this for?
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.
@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 |
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.
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 |
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.
question: can this be done without a relative path?
terraso_backend/tests/graphql/mutations/test_landscape_membership_mutations.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
…hip_mutations.py Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
262ed82
to
52a15aa
Compare
Final PR: #997 |
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
Related Issues
Related PRs