FIX: handle invite error in wizard
This commit is contained in:
parent
52306c393a
commit
1f5089e474
|
@ -11,5 +11,5 @@
|
|||
</div>
|
||||
|
||||
{{#if field.errorDescription}}
|
||||
<div class='field-error-description'>{{field.errorDescription}}</div>
|
||||
<div class='field-error-description'>{{{field.errorDescription}}}</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -235,7 +235,11 @@ class Wizard
|
|||
users.each do |u|
|
||||
args = {}
|
||||
args[:moderator] = true if u['role'] == 'moderator'
|
||||
begin
|
||||
Invite.create_invite_by_email(u['email'], @wizard.user, args)
|
||||
rescue => e
|
||||
updater.errors.add(:invite_list, e.message.concat("<br>"))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -261,4 +265,3 @@ class Wizard
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue