X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d02c4efcfdbe8f21fba895749988b14b7db41310..f60b9d7057fef32a7b61ea4de55b3d95b5b28f6c:/services/api/app/models/log.rb diff --git a/services/api/app/models/log.rb b/services/api/app/models/log.rb index e6969be87c..6921eca9a4 100644 --- a/services/api/app/models/log.rb +++ b/services/api/app/models/log.rb @@ -1,5 +1,5 @@ class Log < ArvadosModel - include AssignUuid + include HasUuid include KindAndEtag include CommonApiTemplate serialize :properties, Hash @@ -24,7 +24,11 @@ class Log < ArvadosModel 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