FIX: handle invite error in wizard
This commit is contained in:
parent
52306c393a
commit
1f5089e474
|
@ -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}}
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue