Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
10a4a80f
authored
2020-08-20 11:38:09 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
4acc8f62
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
src/apps/doc/management/commands/doc_ocr_process.py
src/apps/doc/management/commands/doc_ocr_process.py
View file @
10a4a80
...
...
@@ -132,7 +132,7 @@ class Command(BaseCommand, LoggerMixin):
def
img_ocr_excel
(
self
,
wb
,
img_path
,
role_summary
):
res
=
self
.
fetch_ocr_result
(
img_path
)
self
.
cronjob_log
.
info
(
'{0} [fetch ocr result success] [img={1}] [res={2}]'
.
format
(
self
.
log_base
,
img_path
,
res
))
if
res
.
get
(
'code'
)
==
1
:
if
res
.
get
(
'code'
)
==
'1'
:
sheets_list
=
res
.
get
(
'result'
)
.
get
(
'res'
)
img_name
=
os
.
path
.
basename
(
img_path
)
self
.
append_sheet
(
wb
,
sheets_list
,
img_name
,
role_summary
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment