potential bug in DefaultToolAction collecting chrom info
Hello, In the file lib/galaxy/tools/actions/__init__.py for the execute function of the DefaultToolAction class line 198 has the following code: if trans.user and ( 'dbkeys' in trans.user.preferences ) and ( input_dbkey in trans.user.preferences[ 'dbkeys' ] ): In this case trans.user.preferences[ 'dbkeys' ] is just returning a json string version of the dictionary. The result is that if input_dbkey is a substring of any part of this then it will be returned as True. Something like this would fix (though with the next lines of code it would be converting from json twice): if trans.user and ( 'dbkeys' in trans.user.preferences ) and ( input_dbkey in from_json_string(trans.user.preferences[ 'dbkeys' ] )): Cheers, Andrew
Andrew, You are correct. I've made this change in galaxy-central changeset 4d48285fcaa6 Thanks, J. On Mar 20, 2012, at 9:18 PM, Andrew Warren wrote:
Hello,
In the file lib/galaxy/tools/actions/__init__.py for the execute function of the DefaultToolAction class line 198 has the following code:
if trans.user and ( 'dbkeys' in trans.user.preferences ) and ( input_dbkey in trans.user.preferences[ 'dbkeys' ] ):
In this case trans.user.preferences[ 'dbkeys' ] is just returning a json string version of the dictionary. The result is that if input_dbkey is a substring of any part of this then it will be returned as True. Something like this would fix (though with the next lines of code it would be converting from json twice):
if trans.user and ( 'dbkeys' in trans.user.preferences ) and ( input_dbkey in from_json_string(trans.user.preferences[ 'dbkeys' ] )):
Cheers, Andrew
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
participants (2)
-
Andrew Warren
-
Jeremy Goecks