Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
limbra
limbra
Commits
ebf71895
Commit
ebf71895
authored
Sep 24, 2015
by
LE GAC Renaud
Browse files
Bugs fixed.
parent
fca13ec7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
modules/harvest_tools/automaton.py
modules/harvest_tools/automaton.py
+16
-11
modules/invenio_tools/checkandfix.py
modules/invenio_tools/checkandfix.py
+1
-1
No files found.
modules/harvest_tools/automaton.py
View file @
ebf71895
...
...
@@ -133,21 +133,26 @@ class Automaton(object):
try
:
rec_id
=
db
.
publications
.
insert
(
**
fields
)
return
1
if
rec_id
:
return
1
# operation can be rejected by the database
except
Exception
as
dbe
:
self
.
logs
[
-
1
].
reject
(
dbe
.
message
,
year
)
# operation can be reject by callbacks table._before_insert
else
:
msg
=
MSG_NSERT_FAIL
if
CALLBACK_ERRORS
in
db
.
publications
:
msg
=
db
.
publications
.
_callback_errors
# operation can be reject by callbacks table._before_insert
if
not
rec_id
:
msg
=
MSG_NSERT_FAIL
if
CALLBACK_ERRORS
in
db
.
publications
:
msg
=
db
.
publications
.
_callback_errors
# reduce the error message
if
isinstance
(
msg
,
list
):
msg
=
"%s %s"
%
(
msg
[
0
],
msg
[
-
1
])
self
.
logs
[
-
1
].
reject
(
msg
,
year
)
self
.
logs
[
-
1
].
reject
(
msg
,
log_year
)
return
0
return
0
# operation can be rejected by the database
except
Exception
as
dbe
:
self
.
logs
[
-
1
].
reject
(
dbe
.
message
,
log_year
)
return
0
def
_is_record_in_db
(
self
,
rec_id
,
title
):
"""Return C{True} if the record is already in the database.
...
...
modules/invenio_tools/checkandfix.py
View file @
ebf71895
...
...
@@ -625,7 +625,7 @@ class CheckAndFix(object):
if
not
value
:
raise
CheckException
(
MSG_NO_MY_AUTHOR
)
record
.
my_author
=
value
record
.
my_author
s
=
value
def
is_conference
(
self
,
record
):
"""Check that the record described a conference talk / proceeding.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment