diff --git a/simplestore/lib/simplestore_marc_handler.py b/simplestore/lib/simplestore_marc_handler.py index 21ec56f95b..40ffeaccb9 100644 --- a/simplestore/lib/simplestore_marc_handler.py +++ b/simplestore/lib/simplestore_marc_handler.py @@ -43,7 +43,9 @@ def add_basic_fields(rec, form, email): record_add_field(rec, '245', subfields=[('a', remove_html_markup(form['title']))]) if form['creator']: - record_add_field(rec, '100', subfields=[('a', remove_html_markup(form['creator']))]) + for kw in form['creator'].split(';'): + if kw and not kw.isspace(): + record_add_field(rec, '100', subfields=[('a', remove_html_markup(kw.strip()))]) if form['domain']: record_add_field(rec, '980', subfields=[('a', remove_html_markup(form['domain']))]) @@ -67,7 +69,8 @@ def add_basic_fields(rec, form, email): if form['tags']: for kw in form['tags'].split(','): - record_add_field(rec, '653', + if kw and not kw.isspace(): + record_add_field(rec, '653', ind1='1', subfields=[('a', remove_html_markup(kw.strip()))]) diff --git a/simplestore/lib/simplestore_model/model.py b/simplestore/lib/simplestore_model/model.py index 907549dd25..954652c23e 100644 --- a/simplestore/lib/simplestore_model/model.py +++ b/simplestore/lib/simplestore_model/model.py @@ -44,7 +44,7 @@ class SubmissionMetadata(db.Model): id = db.Column(db.Integer, primary_key=True) description = db.Column(db.Text(), nullable=False) - creator = db.Column(db.String(128)) + creator = db.Column(db.String(256)) # split on ; title = db.Column(db.String(256), nullable=False) open_access = db.Column(db.Boolean(), default=True) @@ -137,10 +137,10 @@ def __init__(self): 'will not be public, however the metadata will be.' } self.field_args['contributors'] = { - 'placeholder': 'co-author 1; co-author 2; ...', + 'placeholder': 'contributor 1; contributor 2; ...', 'description': - 'A semicolon separated list of ' +\ - 'contributors, e.g. further authors. Mention all ' +\ + 'A semicolon separated list of all other ' +\ + 'contributors. Mention all ' +\ 'other persons that were relevant in the creation of the resource.' } self.field_args['language'] = { @@ -161,8 +161,9 @@ def __init__(self): 'Any kind of other reference such as a URN, URI or an ISBN number.' } self.field_args['creator'] = { - 'placeholder': 'The main author of the resource.', - 'description': 'The person who created the resource.' + 'placeholder': 'author 1; author 2; ... ', + 'description': + 'A semicolon separated list of authors of the resource.' } def _create_metadata_class(cfg):