projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3214: Readability: rearrange conditionals, and say "old" instead of "existing"
[arvados.git]
/
services
/
api
/
app
/
models
/
api_client_authorization.rb
diff --git
a/services/api/app/models/api_client_authorization.rb
b/services/api/app/models/api_client_authorization.rb
index 82dd0ec2b6177847f72460b87b492950b66a605a..5817ff6648f933d15d34f8c91064bf778712a964 100644
(file)
--- a/
services/api/app/models/api_client_authorization.rb
+++ b/
services/api/app/models/api_client_authorization.rb
@@
-30,7
+30,7
@@
class ApiClientAuthorization < ArvadosModel
self.user.andand.uuid
end
def owner_uuid_was
self.user.andand.uuid
end
def owner_uuid_was
- self.user_id_changed? ? User.
find(self.user_id_was)
.andand.uuid : self.user.andand.uuid
+ self.user_id_changed? ? User.
where(id: self.user_id_was).first
.andand.uuid : self.user.andand.uuid
end
def owner_uuid_changed?
self.user_id_changed?
end
def owner_uuid_changed?
self.user_id_changed?