commit/galaxy-central: dannon: Safe fix here, but we should follow up on the database migration to avoid having cruft.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/8ce690c0910c/ Changeset: 8ce690c0910c User: dannon Date: 2014-10-10 15:14:37+00:00 Summary: Safe fix here, but we should follow up on the database migration to avoid having cruft. Merged in dan/galaxy-central-prs (pull request #511) Allow Model objects to be loaded when they have bad JSON values. When bad JSON is encountered, substitute with None. Affected #: 1 file diff -r a40dc4c1f075938eac42fd428e5fc7697560d751 -r 8ce690c0910c1f6a11f90fe91b51ca964e879d1f lib/galaxy/model/custom_types.py --- a/lib/galaxy/model/custom_types.py +++ b/lib/galaxy/model/custom_types.py @@ -47,9 +47,12 @@ return json_encoder.encode( value ) def process_result_value( self, value, dialect ): - if value is None: - return None - return json_decoder.decode( str( _sniffnfix_pg9_hex(value) ) ) + if value is not None: + try: + return json_decoder.decode( str( _sniffnfix_pg9_hex( value ) ) ) + except Exception, e: + log.error( 'Failed to decode JSON (%s): %s', value, e ) + return None def copy_value( self, value ): # return json_decoder.decode( json_encoder.encode( value ) ) 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)
-
commits-noreply@bitbucket.org