diff --git a/app/controllers/api/v1/plans_controller.rb b/app/controllers/api/v1/plans_controller.rb index 66ddef646f..2e2a1a1fce 100644 --- a/app/controllers/api/v1/plans_controller.rb +++ b/app/controllers/api/v1/plans_controller.rb @@ -74,9 +74,6 @@ def create # rubocop:enable Metrics/BlockNesting assign_roles(plan: plan) - # TODO: Remove this customization after the Hackathon - UserMailer.api_plan_creation(plan, plan.owner).deliver_now - # Kaminari Pagination requires an ActiveRecord result set :/ @items = paginate_response(results: Plan.where(id: plan.id)) render "/api/v1/plans/index", status: :created @@ -144,7 +141,7 @@ def contributor_to_user(contributor:) return user if user.present? # If the user was not found, invite them and attach any know identifiers - names = contributor.name.split + names = contributor.name&.split || [""] firstname = names.length > 1 ? names.first : nil surname = names.length > 1 ? names.last : names.first # user = User.invite!({ email: contributor.email,