Skip to content

Commit

Permalink
BibHarvest: fix error while adding OAI source
Browse files Browse the repository at this point in the history
* Fixes an issue when adding new OAI sources in the admin interface.
  • Loading branch information
jalavik authored and tiborsimko committed Apr 27, 2011
1 parent 5af7880 commit e37181b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/bibharvest/lib/oai_harvest_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def perform_request_editsource(oai_src_id=None, oai_src_name='',
def perform_request_addsource(oai_src_name=None, oai_src_baseurl='',
oai_src_prefix='', oai_src_frequency='',
oai_src_lastrun='', oai_src_config='',
oai_src_post='', ln=CFG_SITE_LANG,
oai_src_post=[], ln=CFG_SITE_LANG,
confirm= -1, oai_src_sets=None,
oai_src_bibfilter=''):
"""creates html form to add a new source"""
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def add_oai_src(oai_src_name, oai_src_baseurl, oai_src_prefix, oai_src_frequency
lastrun_mode = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
# lastrun_mode = "'"+lastrun_mode+"'"
run_sql("INSERT INTO oaiHARVEST (id, baseurl, metadataprefix, arguments, comment, bibconvertcfgfile, name, lastrun, frequency, postprocess, bibfilterprogram, setspecs) VALUES (0, %s, %s, NULL, NULL, %s, %s, %s, %s, %s, %s, %s)", \
(oai_src_baseurl, oai_src_prefix, oai_src_config, oai_src_name, lastrun_mode, oai_src_frequency, oai_src_post, oai_src_bibfilter, " ".join(oai_src_sets)))
(oai_src_baseurl, oai_src_prefix, oai_src_config, oai_src_name, lastrun_mode, oai_src_frequency, '-'.join(oai_src_post), oai_src_bibfilter, " ".join(oai_src_sets)))
return (1, "")
except StandardError, e:
return (0, e)
Expand Down

0 comments on commit e37181b

Please sign in to comment.