Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
boke0 committed Mar 24, 2021
1 parent 13cd663 commit 7e0d7ca
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions mitama/portal/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,6 @@ def setup(self, request):
if request.method == "POST":
try:
form = SetupForm(request.post())
user = UserInvite()
user.email = form["email"]
user.roles = "owner"
user.create()
user.mail(
"Mitamaへようこそ",
"下記リンクから、Mitamaに参加しましょう\n{}".format(
self.app.convert_fullurl(
request,
"/signup?token=" + user.token
)
)
)

try:
owner = Role()
Expand Down Expand Up @@ -200,6 +187,20 @@ def setup(self, request):
InnerPermission.accept("add_group", inner_manager)
InnerPermission.accept("remove_group", inner_owner)

user = UserInvite()
user.email = form["email"]
user.roles = owner._id
user.create()
user.mail(
"Mitamaへようこそ",
"下記リンクから、Mitamaに参加しましょう\n{}".format(
self.app.convert_fullurl(
request,
"/signup?token=" + user.token
)
)
)

template = self.view.get_template("confirm.html")
return Response.render(template)
except ValidationError as err:
Expand Down

0 comments on commit 7e0d7ca

Please sign in to comment.