class Log < ArvadosModel
- include AssignUuid
+ include HasUuid
include KindAndEtag
include CommonApiTemplate
serialize :properties, Hash
attr_accessor :object, :object_kind
api_accessible :user, extend: :common do |t|
+ t.add :id
t.add :object_uuid
t.add :object_owner_uuid
t.add :object_kind
def fill_object(thing)
self.object_uuid ||= thing.uuid
- self.object_owner_uuid = thing.owner_uuid
+ if respond_to? :object_owner_uuid=
+ # Skip this if the object_owner_uuid migration hasn't happened
+ # yet, i.e., we're in the process of migrating an old database.
+ self.object_owner_uuid = thing.owner_uuid
+ end
self.summary ||= "#{self.event_type} of #{thing.uuid}"
self
end