projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c223e3
)
set modified_by_user=nil instead of breaking if no user is logged in
author
Tom Clegg <tom@clinicalfuture.com>
Sat, 9 Feb 2013 08:16:07 +0000
(
03:16
-0500)
committer
Tom Clegg <tom@clinicalfuture.com>
Sat, 9 Feb 2013 08:16:07 +0000
(
03:16
-0500)
app/models/orvos_model.rb
patch
|
blob
|
history
diff --git
a/app/models/orvos_model.rb
b/app/models/orvos_model.rb
index f9bc59d2bed0c160b5ea81509f54a3547670a77e..6feb89108406197a5afcbad36dc041fe432e8ed9 100644
(file)
--- a/
app/models/orvos_model.rb
+++ b/
app/models/orvos_model.rb
@@
-82,9
+82,9
@@
class OrvosModel < ActiveRecord::Base
def update_modified_by_fields
self.created_at ||= Time.now
- self.owner ||= current_user.uuid
+ self.owner ||= current_user.uuid
if current_user
self.modified_at = Time.now
- self.modified_by_user = current_user
.uuid
+ self.modified_by_user = current_user
? current_user.uuid : nil
self.modified_by_client = current_api_client ? current_api_client.uuid : nil
end
end