X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3dccfa028282d8b667a7b447ea061b7eecc8618f..675794872a5d064cf0a8177d662555c04b0dae51:/services/api/lib/has_uuid.rb?ds=inline diff --git a/services/api/lib/has_uuid.rb b/services/api/lib/has_uuid.rb index d9c819889f..3bd330edca 100644 --- a/services/api/lib/has_uuid.rb +++ b/services/api/lib/has_uuid.rb @@ -28,7 +28,10 @@ module HasUuid def assign_uuid return true if !self.respond_to_uuid? - return true if uuid and current_user and current_user.is_admin + if (uuid.is_a?(String) and uuid.length>0 and + current_user and current_user.is_admin) + return true + end self.uuid = self.class.generate_uuid end