Skip to content

Commit

Permalink
766647 - duplicate env creation - better error message needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Chalupa committed Apr 23, 2012
1 parent 233a753 commit 52e9349
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/controllers/api/environments_controller.rb
Expand Up @@ -53,6 +53,7 @@ def show
def create
environment = KTEnvironment.new(params[:environment])
@organization.environments << environment
raise ActiveRecord::RecordInvalid.new(environment) unless environment.valid?
@organization.save!
render :json => environment
end
Expand Down

0 comments on commit 52e9349

Please sign in to comment.