mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
fixes owner id if empty
This commit is contained in:
parent
1afb4c9a42
commit
307fef17d8
1 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue