X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7ce745d5645dc49c2833c1c617fd488bf3a62307..651638a28db20a2016dff02e3baa106ab27ff945:/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