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
0789b0b9
Commit
0789b0b9
authored
Apr 30, 2015
by
MEESSEN Christophe
Browse files
small fixes
parent
da2b04fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
controllers/harvest.py
controllers/harvest.py
+1
-4
modules/harvest_tools.py
modules/harvest_tools.py
+9
-9
No files found.
controllers/harvest.py
View file @
0789b0b9
...
...
@@ -45,9 +45,6 @@ def free_run():
selector
=
Selector
(
table
,
exclude_fields
=
(
'mode'
,
'year_start'
,
'year_end'
))
#from pprint import pprint
#pprint(selector))
for
el
in
fields
:
if
not
selector
[
el
]:
msg
=
T
(
'All fields of the form have to be defined !!!'
)
...
...
@@ -273,7 +270,7 @@ def run():
row
=
selector
.
select
(
db
.
harvesters
).
first
()
if
not
row
:
raise
ToolException
(
MSG_NO_HARVESTER
)
tool
=
tool_class
(
db
,
selector
.
id_teams
,
selector
.
id_projects
,
...
...
modules/harvest_tools.py
View file @
0789b0b9
...
...
@@ -533,12 +533,12 @@ class PublicationsTool(object):
li
.
append
(
str
(
year
))
rex
=
'|'
.
join
(
li
)
di
=
dict
(
cc
=
collection
,
# collection
f1
=
'year'
,
# search on year
m1
=
'r'
,
# use regular expression
p1
=
rex
,
# regular expression defining year
sf
=
'year'
,
# sort by date
so
=
'd'
)
# descending order
di
=
dict
(
cc
=
collection
,
# collection
f1
=
'year'
,
# search on year
m1
=
'r'
,
# use regular expression
p1
=
rex
,
# regular expression defining year
sf
=
'year'
,
# sort by date
so
=
'd'
)
# descending order
return
di
...
...
@@ -599,7 +599,7 @@ class PublicationsTool(object):
# extract the list from the database
row
=
self
.
db
.
my_authors
(
year
=
year
,
id_projects
=
self
.
id_project
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
)
if
row
:
...
...
@@ -776,7 +776,7 @@ class PublicationsTool(object):
print
"process URL search"
store
=
InvenioStore
(
self
.
host
)
# list of collections
collections
=
self
.
collections
collections
=
re
.
sub
(
' *, *'
,
','
,
collections
).
split
(
','
)
...
...
@@ -918,7 +918,7 @@ class PublicationsTool(object):
print
"start processing"
,
self
.
__class__
.
__name__
print
"decode request"
# protection team, project and/or category have to be defined
# protection team, project and/or category have to be defined
if
not
self
.
id_project
:
raise
ToolException
(
MSG_NO_PROJECT
)
...
...
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