- def self.start_from(thing, event_type)
- self.new do |log|
- log.event_type = event_type
- log.properties = {
- 'old_etag' => nil,
- 'old_attributes' => nil,
- }
- log.seed_basics_from thing
+ def object_kind
+ if k = ArvadosModel::resource_class_for_uuid(object_uuid)
+ k.kind
+ end
+ end
+
+ def fill_object(thing)
+ self.object_uuid ||= thing.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