details: http://www.bx.psu.edu/hg/galaxy/rev/26f01eafc6bd changeset: 3355:26f01eafc6bd user: Dan Blankenberg <dan@bx.psu.edu> date: Mon Feb 08 11:20:44 2010 -0500 description: On edit attributes page, only sanitize and add annotation when it exists. Metadata editing was throwing server error when not logged in. diffstat: lib/galaxy/web/controllers/root.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (15 lines): diff -r 4e8785b6815c -r 26f01eafc6bd lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py Mon Feb 08 10:00:30 2010 -0500 +++ b/lib/galaxy/web/controllers/root.py Mon Feb 08 11:20:44 2010 -0500 @@ -307,8 +307,9 @@ setattr( data.metadata, name, spec.unwrap( params.get (name, None) ) ) data.datatype.after_setting_metadata( data ) # Sanitize annotation before adding it. - annotation = sanitize_html( params.annotation, 'utf-8', 'text/html' ) - self.add_item_annotation( trans, data, annotation ) + if params.annotation: + annotation = sanitize_html( params.annotation, 'utf-8', 'text/html' ) + self.add_item_annotation( trans, data, annotation ) else: msg = ' (Metadata could not be changed because this dataset is currently being used as input or output. You must cancel or wait for these jobs to complete before changing metadata.)' trans.sa_session.flush()