From 1f5089e474a346325a04a54198e6f2aa0a281a64 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Fri, 21 Apr 2017 19:07:24 +0530 Subject: [PATCH] FIX: handle invite error in wizard --- .../wizard/templates/components/wizard-field.hbs | 2 +- lib/wizard/builder.rb | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/wizard/templates/components/wizard-field.hbs b/app/assets/javascripts/wizard/templates/components/wizard-field.hbs index 37c216baae3..8f804940fb6 100644 --- a/app/assets/javascripts/wizard/templates/components/wizard-field.hbs +++ b/app/assets/javascripts/wizard/templates/components/wizard-field.hbs @@ -11,5 +11,5 @@ {{#if field.errorDescription}} -
{{field.errorDescription}}
+
{{{field.errorDescription}}}
{{/if}} diff --git a/lib/wizard/builder.rb b/lib/wizard/builder.rb index 3fc48b8313a..9600a9ab57c 100644 --- a/lib/wizard/builder.rb +++ b/lib/wizard/builder.rb @@ -235,7 +235,11 @@ class Wizard users.each do |u| args = {} 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("
")) + end end end end @@ -261,4 +265,3 @@ class Wizard end end end -