Fix sonar

This commit is contained in:
amcmanu3 2024-06-23 20:41:06 -04:00
parent 5a6229d282
commit 07e094d11e
2 changed files with 5 additions and 5 deletions

View File

@ -212,7 +212,7 @@ class ApiFilesUploadHandler(BaseApiHandler):
},
)
logger.info(
f"File upload completed. Filename: {self.filename}" f" Type: {u_type}"
f"File upload completed. Filename: {self.filename} Type: {u_type}"
)
return self.finish_json(
200,
@ -242,7 +242,7 @@ class ApiFilesUploadHandler(BaseApiHandler):
# At this point filename, chunk index and total chunks are required
# in the request
if not self.filename or self.chunk_index is None or total_chunks is None:
if not self.filename or self.chunk_index is None:
logger.error(
f"File upload failed. Filename: {self.filename}"
f"Type: {u_type} Error: CHUNK INDEX NOT FOUND"

View File

@ -1,4 +1,4 @@
async function uploadFile(type, file = null, path = null, file_num = 0, _onProgress) {
async function uploadFile(type, file = null, path = null, file_num = 0, _onProgress = null) {
if (file == null) {
try {
file = $("#file")[0].files[0];
@ -153,8 +153,8 @@ async function uploadFile(type, file = null, path = null, file_num = 0, _onProgr
let full_path = path + '/' + name;
let flag = false;
for (let k = 0; k < items.length; ++k) {
if ($(items[k]).attr("data-name") == name) {
for (let item of items) {
if ($(item).attr("data-name") === name) {
flag = true;
}
}