commit/galaxy-central: dan: Unicode fixes for annotations
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/30c7f58f116d/ changeset: 30c7f58f116d user: dan date: 2012-08-29 16:03:42 summary: Unicode fixes for annotations affected #: 2 files diff -r 80dd03582ea9041d0c897b3a2c58e12a5bb494bb -r 30c7f58f116d9e11a209ed8a5d193ec2d91de280 lib/galaxy/model/item_attrs.py --- a/lib/galaxy/model/item_attrs.py +++ b/lib/galaxy/model/item_attrs.py @@ -95,7 +95,7 @@ """ Returns a user's annotation string for an item. """ annotation_obj = self.get_item_annotation_obj( db_session, user, item ) if annotation_obj: - return annotation_obj.annotation + return galaxy.util.unicodify( annotation_obj.annotation ) return None def get_item_annotation_obj( self, db_session, user, item ): diff -r 80dd03582ea9041d0c897b3a2c58e12a5bb494bb -r 30c7f58f116d9e11a209ed8a5d193ec2d91de280 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py +++ b/lib/galaxy/web/controllers/dataset.py @@ -644,7 +644,10 @@ dataset = self.get_dataset( trans, id, False, True ) if not dataset: web.httpexceptions.HTTPNotFound() - return self.get_item_annotation_str( trans.sa_session, trans.user, dataset ) + annotation = self.get_item_annotation_str( trans.sa_session, trans.user, dataset ) + if annotation and isinstance( annotation, unicode ): + annotation = annotation.encode( 'ascii', 'replace' ) #paste needs ascii here + return annotation @web.expose def display_at( self, trans, dataset_id, filename=None, **kwd ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket