FIX: handle invite error in wizard

This commit is contained in:
Arpit Jalan 2017-04-21 19:07:24 +05:30
parent 52306c393a
commit 1f5089e474
2 changed files with 6 additions and 3 deletions

View File

@ -11,5 +11,5 @@
</div> </div>
{{#if field.errorDescription}} {{#if field.errorDescription}}
<div class='field-error-description'>{{field.errorDescription}}</div> <div class='field-error-description'>{{{field.errorDescription}}}</div>
{{/if}} {{/if}}

View File

@ -235,7 +235,11 @@ class Wizard
users.each do |u| users.each do |u|
args = {} args = {}
args[:moderator] = true if u['role'] == 'moderator' args[:moderator] = true if u['role'] == 'moderator'
Invite.create_invite_by_email(u['email'], @wizard.user, args) 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 end
end end
@ -261,4 +265,3 @@ class Wizard
end end
end end
end end