Skip to content

Commit

Permalink
fix: fix create project (#867)
Browse files Browse the repository at this point in the history
* fix: Return ProjectMembershipList for Project

* test: Update test to catch failure
  • Loading branch information
David Code Howard authored Oct 4, 2023
1 parent 49e1584 commit 06301f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion terraso_backend/apps/project_management/models/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def save(self, *args, **kwargs):
@staticmethod
def create_membership_list() -> MembershipList:
"""Creates a default group for a project"""
return MembershipList.objects.create(
return ProjectMembershipList.objects.create(
membership_type=MembershipList.MEMBERSHIP_TYPE_OPEN,
enroll_method=MembershipList.ENROLL_METHOD_JOIN,
)
Expand Down
3 changes: 3 additions & 0 deletions terraso_backend/tests/graphql/mutations/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
project {
id
seen
membershipList {
id
}
}
}
}
Expand Down

0 comments on commit 06301f2

Please sign in to comment.