From 307fef17d850fdcd033cecdf723a3023df51e5d3 Mon Sep 17 00:00:00 2001 From: zmagod Date: Wed, 15 Mar 2017 18:01:15 +0100 Subject: [PATCH] fixes owner id if empty --- app/controllers/wopi_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/wopi_controller.rb b/app/controllers/wopi_controller.rb index 02ec21ac5..fdcf5d996 100644 --- a/app/controllers/wopi_controller.rb +++ b/app/controllers/wopi_controller.rb @@ -49,9 +49,12 @@ class WopiController < ActionController::Base end def check_file_info + asset_owner_id = @asset.id.to_s + asset_owner_id = @asset.created_by_id.to_s if @asset.created_by_id + msg = { BaseFileName: @asset.file_file_name, - OwnerId: @asset.created_by_id.to_s || @asset.id.to_s, + OwnerId: asset_owner_id, Size: @asset.file_file_size, UserId: @user.id.to_s, Version: @asset.version.to_s,