fixes owner id if empty

This commit is contained in:
zmagod 2017-03-15 18:01:15 +01:00
parent 1afb4c9a42
commit 307fef17d8

View file

@ -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,