Skip to content

Commit

Permalink
Merge PR #296 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 18, 2024
2 parents 33526b2 + d849c22 commit 9d157ea
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dms/static/src/js/views/dms_file_upload.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,16 @@ export const FileUpload = {
return;
}

if (this.props.domain.length === 1) {
ctx.default_directory_id = this.props.domain[0][2];
} else {
ctx.default_directory_id = this.props.domain[2][2];
// Search the correct directory_id value according to the domain
ctx.default_directory_id = false;
if (this.props.domain) {
for (const domain_item of this.props.domain) {
if (domain_item.length === 3) {
if (domain_item[0] === "directory_id" && domain_item[1] === "=") {
ctx.default_directory_id = domain_item[2];
}
}
}
}

if (ctx.default_directory_id === false) {
Expand Down

0 comments on commit 9d157ea

Please sign in to comment.