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>
{{#if field.errorDescription}}
<div class='field-error-description'>{{field.errorDescription}}</div>
<div class='field-error-description'>{{{field.errorDescription}}}</div>
{{/if}}

View File

@ -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