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
Open sidebar
limbra
limbra
Commits
1364f2d9
Commit
1364f2d9
authored
Jan 18, 2021
by
LE GAC Renaud
Browse files
Update to deal with search_synonym exception
parent
199d216f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
12 deletions
+20
-12
modules/store_tools/confmixin.py
modules/store_tools/confmixin.py
+11
-7
modules/store_tools/recordcdspubli.py
modules/store_tools/recordcdspubli.py
+8
-4
modules/store_tools/recordheppubli.py
modules/store_tools/recordheppubli.py
+1
-1
No files found.
modules/store_tools/confmixin.py
View file @
1364f2d9
...
...
@@ -6,7 +6,7 @@ from .base import (MSG_NO_CONF_DATE,
REG_DATE
,
search_synonym
,
T6
)
from
.exception
import
CheckException
from
.exception
import
CheckException
,
ToolException
from
datetime
import
datetime
from
plugin_dbui
import
CLEAN_SPACES
,
UNDEF_ID
...
...
@@ -70,13 +70,17 @@ class ConfMixin(object):
if
len
(
val
)
==
0
:
raise
CheckException
(
MSG_UNKNOWN_COUNTRY
)
dbid
=
search_synonym
(
db
.
countries
,
"country"
,
val
)
if
dbid
==
UNDEF_ID
:
raise
CheckException
(
MSG_UNKNOWN_COUNTRY
)
try
:
dbid
=
search_synonym
(
db
.
countries
,
"country"
,
val
)
if
dbid
==
UNDEF_ID
:
raise
CheckException
(
MSG_UNKNOWN_COUNTRY
)
country
=
db
.
countries
[
dbid
].
country
if
country
!=
val
:
self
.
conference
[
"addresses"
][
0
][
"country"
]
=
country
country
=
db
.
countries
[
dbid
].
country
if
country
!=
val
:
self
.
conference
[
"addresses"
][
0
][
"country"
]
=
country
except
ToolException
as
e
:
raise
CheckException
(
*
e
.
args
)
def
conference_country
(
self
):
"""The country where the conference took place.
...
...
modules/store_tools/recordcdspubli.py
View file @
1364f2d9
...
...
@@ -16,7 +16,7 @@ from .base import (ARXIV,
REG_DOI
,
REG_OAI
,
T4
,
T6
)
from
.exception
import
CheckException
from
.exception
import
CheckException
,
ToolException
from
filters
import
CLEAN_COLLABORATION
from
pandas
import
concat
,
DataFrame
from
plugin_dbui
import
CLEAN_SPACES
,
UNDEF_ID
...
...
@@ -400,9 +400,13 @@ class RecordCdsPubli(dict, AuthorsMixin, PublicationInfoMixin):
if
len
(
val
)
==
0
:
return
dbid
=
search_synonym
(
db
.
collaborations
,
"collaboration"
,
val
)
if
dbid
==
UNDEF_ID
:
raise
CheckException
(
MSG_UNKNOWN_COLLABORATION
)
try
:
dbid
=
search_synonym
(
db
.
collaborations
,
"collaboration"
,
val
)
if
dbid
==
UNDEF_ID
:
raise
CheckException
(
MSG_UNKNOWN_COLLABORATION
)
except
ToolException
as
e
:
raise
CheckException
(
*
e
.
args
)
collaboration
=
db
.
collaborations
[
dbid
].
collaboration
...
...
modules/store_tools/recordheppubli.py
View file @
1364f2d9
...
...
@@ -247,7 +247,7 @@ class RecordHepPubli(dict, AuthorsMixin, PublicationInfoMixin):
self
[
"collaborations"
]
=
[{
"value"
:
collaboration
}]
except
ToolException
as
e
:
raise
CheckException
(
e
)
raise
CheckException
(
*
e
.
args
)
def
check_my_affiliation
(
self
,
rex_institute
=
None
):
"""Check that authors of my institute are signatories.
...
...
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