Skip to content

Commit

Permalink
Use add instead of create.
Browse files Browse the repository at this point in the history
  • Loading branch information
teymour-aldridge committed Feb 24, 2025
1 parent ebfdb66 commit 7137c84
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tabbycat/users/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def get_users(self, email):
'username': email.split("@")[0],
},
)
if created:
user.membership_set.create(group=self.cleaned_data['role'])
user.membership_set.add(group=self.cleaned_data['role'])
return [user]

def save(self, *args, **kwargs):
Expand Down

0 comments on commit 7137c84

Please sign in to comment.