projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76e20e6
)
Behave nicer if supplied owner_uuid is not a valid uuid at all.
author
Tom Clegg <tom@curoverse.com>
Mon, 5 May 2014 10:08:30 +0000
(06:08 -0400)
committer
Tom Clegg <tom@curoverse.com>
Mon, 5 May 2014 10:08:30 +0000
(06:08 -0400)
services/api/app/models/arvados_model.rb
patch
|
blob
|
history
diff --git
a/services/api/app/models/arvados_model.rb
b/services/api/app/models/arvados_model.rb
index ae0e490c6e08c0d2d46ba463181ced01b758a994..e495f9ff75f978439b909d824079e0114278402b 100644
(file)
--- a/
services/api/app/models/arvados_model.rb
+++ b/
services/api/app/models/arvados_model.rb
@@
-144,6
+144,8
@@
class ArvadosModel < ActiveRecord::Base
if x == uuid
# Test for cycles with the new version, not the DB contents
x = owner_uuid
+ elsif !owner_class.respond_to? :find_by_uuid
+ raise ActiveRecord::RecordNotFound.new
else
x = owner_class.find_by_uuid(x).owner_uuid
end