14873: Rails 5 upgrade. Some tests still failing. (WIP)
[arvados.git] / services / api / lib / has_uuid.rb
index dc8bdcb6c5ab126cbc9e2a758173c37c8faae7d9..60db53d5e687440f4297b0ea29fc5893e52cf68c 100644 (file)
@@ -79,8 +79,8 @@ module HasUuid
 
   def destroy_permission_links
     if uuid
-      Link.destroy_all(['link_class=? and (head_uuid=? or tail_uuid=?)',
-                        'permission', uuid, uuid])
+      Link.where(['link_class=? and (head_uuid=? or tail_uuid=?)',
+                  'permission', uuid, uuid]).destroy_all
     end
   end
 end