fix exception when current_api_client==nil
authorTom Clegg <tom@clinicalfuture.com>
Fri, 25 Jan 2013 23:05:17 +0000 (15:05 -0800)
committerTom Clegg <tom@clinicalfuture.com>
Fri, 25 Jan 2013 23:05:17 +0000 (15:05 -0800)
app/models/orvos_model.rb

index 5e37fd3c062b8484a66d86f7fa372ec5bd1f16d6..484fbc05c9422ecb887fbed94b5faf3294f687e4 100644 (file)
@@ -53,7 +53,7 @@ class OrvosModel < ActiveRecord::Base
       self.owner ||= current_user.uuid
       self.modified_at = Time.now
       self.modified_by_user = current_user.uuid
-      self.modified_by_client = current_api_client.uuid
+      self.modified_by_client = current_api_client ? current_api_client.uuid : nil
     end
   end
 end