Fix incorrect find(), should have been find_by_uuid()
authorTom Clegg <tom@curoverse.com>
Wed, 15 Jan 2014 17:11:25 +0000 (09:11 -0800)
committerTom Clegg <tom@curoverse.com>
Wed, 15 Jan 2014 17:11:25 +0000 (09:11 -0800)
refs #1871
amends 463e996ae5276dc41deca98cb444c802e6f5e251

services/api/app/controllers/application_controller.rb

index f2d238a2480d8c9b5a60d2274735c98f1e66c37e..989f9f59248d84453426c696511430323264adab 100644 (file)
@@ -329,7 +329,7 @@ class ApplicationController < ActionController::Base
     # This is necessary to prevent an ActiveRecord::ReadOnlyRecord
     # error when updating an object which was retrieved using a join.
     if @object.andand.readonly?
-      @object = model_class.find(@objects.first.uuid)
+      @object = model_class.find_by_uuid(@objects.first.uuid)
     end
   end