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
4fa33a02
authored
2020-11-07 01:54:15 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
3f659eb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
4fa33a0
...
...
@@ -611,7 +611,7 @@ class Command(BaseCommand, LoggerMixin):
except
Exception
as
e
:
doc
.
status
=
DocStatus
.
UPLOAD_FAILED
.
value
doc
.
end_time
=
timezone
.
now
()
doc
.
duration
=
(
doc
.
start_time
-
doc
.
end
_time
)
.
seconds
doc
.
duration
=
(
doc
.
end_time
-
doc
.
start
_time
)
.
seconds
for
field
,
count
in
count_list
:
if
hasattr
(
doc
,
field
):
setattr
(
doc
,
field
,
count
)
...
...
@@ -623,7 +623,7 @@ class Command(BaseCommand, LoggerMixin):
else
:
doc
.
status
=
DocStatus
.
COMPLETE
.
value
doc
.
end_time
=
timezone
.
now
()
doc
.
duration
=
(
doc
.
start_time
-
doc
.
end
_time
)
.
seconds
doc
.
duration
=
(
doc
.
end_time
-
doc
.
start
_time
)
.
seconds
for
field
,
count
in
count_list
:
if
hasattr
(
doc
,
field
):
setattr
(
doc
,
field
,
count
)
...
...
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