Skip to content

Commit

Permalink
Merge branch 'dev' into #431/EditIpAndDns
Browse files Browse the repository at this point in the history
  • Loading branch information
BraunTom committed Mar 3, 2019
2 parents e3f8664 + 27132ab commit 1572450
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def create
@request = Request.new(request_params.merge(user: current_user))
@request.assign_sudo_users(request_params[:sudo_user_ids])
respond_to do |format|
if enough_resources? && @request.save
# check for validity first, before checking enough_resources?
# this is neccessary to ensure that the request contains all information needed for enough_resources?
if @request.valid? && enough_resources? && @request.save
successful_save(format)
else
unsuccessful_action(format, :new)
Expand Down

0 comments on commit 1572450

Please sign in to comment.