diff --git a/hc/accounts/models.py b/hc/accounts/models.py index f68e3937..17b7ecbe 100644 --- a/hc/accounts/models.py +++ b/hc/accounts/models.py @@ -359,7 +359,7 @@ class Project(models.Model): return False role = Member.Role.REGULAR if rw else Member.Role.READONLY - Member.objects.create(user=user, project=self, rw=rw, role=role) + Member.objects.create(user=user, project=self, role=role) checks_url = reverse("hc-checks", args=[self.code]) user.profile.send_instant_login_link(self, redirect_url=checks_url) return True @@ -427,7 +427,6 @@ class Member(models.Model): user = models.ForeignKey(User, models.CASCADE, related_name="memberships") project = models.ForeignKey(Project, models.CASCADE) transfer_request_date = models.DateTimeField(null=True, blank=True) - rw = models.BooleanField(default=True, null=True) role = models.CharField(max_length=1, default=Role.REGULAR, choices=Role.choices) class Meta: diff --git a/hc/accounts/tests/test_project.py b/hc/accounts/tests/test_project.py index 46e5b3ff..9f9d3fd6 100644 --- a/hc/accounts/tests/test_project.py +++ b/hc/accounts/tests/test_project.py @@ -78,7 +78,6 @@ class ProjectTestCase(BaseTestCase): ) # The read-write flag should be set - self.assertTrue(member.rw) self.assertEqual(member.role, member.Role.REGULAR) # The new user should not have their own project @@ -99,7 +98,6 @@ class ProjectTestCase(BaseTestCase): project=self.project, user__email="frank@example.org" ) - self.assertFalse(member.rw) self.assertEqual(member.role, member.Role.READONLY) def test_it_adds_member_from_another_team(self):