Fix: Null retailer_name
This commit is contained in:
parent
a39dfe324b
commit
c0cdfdfba0
@ -99,11 +99,10 @@ def process_pdf(rq_id, sub_id, p_type, user_id, files):
|
|||||||
_b_urls = process_pdf_file(file["file_name"], file["file_path"], new_request, user)
|
_b_urls = process_pdf_file(file["file_name"], file["file_path"], new_request, user)
|
||||||
if _b_urls is None:
|
if _b_urls is None:
|
||||||
raise FileContentInvalidException
|
raise FileContentInvalidException
|
||||||
for i in range(len(_b_urls)):
|
for j in range(len(_b_urls)):
|
||||||
_b_urls[i]["doc_type"] = file["file_type"]
|
_b_urls[j]["doc_type"] = file["file_type"]
|
||||||
# b_urls += _b_urls # TODO: Client may request all images in a file, for now, extract the first page only
|
|
||||||
for j in range(len(b_urls)):
|
|
||||||
_b_urls[j]["page_number"] = j + len(b_urls)
|
_b_urls[j]["page_number"] = j + len(b_urls)
|
||||||
|
# b_urls += _b_urls # TODO: Client may request all images in a file, for now, extract the first page only
|
||||||
b_urls.append(_b_urls[0])
|
b_urls.append(_b_urls[0])
|
||||||
elif extension in image_extensions:
|
elif extension in image_extensions:
|
||||||
this_url = ProcessUtil.process_image_local_file(file["file_name"], file["file_path"], new_request, user)[0]
|
this_url = ProcessUtil.process_image_local_file(file["file_name"], file["file_path"], new_request, user)[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user