[hg] galaxy 2735: Fixed a bug in creating requests as an admin
details: http://www.bx.psu.edu/hg/galaxy/rev/12e6192f6201 changeset: 2735:12e6192f6201 user: rc date: Mon Sep 21 10:49:17 2009 -0400 description: Fixed a bug in creating requests as an admin 2 file(s) affected in this change: lib/galaxy/web/form_builder.py scripts/galaxy_messaging/amqp_consumer.py diffs (62 lines): diff -r 63e37852f658 -r 12e6192f6201 lib/galaxy/web/form_builder.py --- a/lib/galaxy/web/form_builder.py Mon Sep 21 10:46:36 2009 -0400 +++ b/lib/galaxy/web/form_builder.py Mon Sep 21 10:49:17 2009 -0400 @@ -384,8 +384,9 @@ from galaxy import util address_html = '' add_ids = ['none'] - for a in self.user.addresses: - add_ids.append(str(a.id)) + if self.user: + for a in self.user.addresses: + add_ids.append(str(a.id)) add_ids.append('new') self.select_address = SelectField(self.name, refresh_on_change=True, @@ -394,16 +395,17 @@ self.select_address.add_option('Select one', 'none', selected=True) else: self.select_address.add_option('Select one', 'none') - for a in self.user.addresses: - if not a.deleted: - if self.value == str(a.id): - self.select_address.add_option(a.desc, str(a.id), selected=True) - # display this address - address_html = '''<div class="form-row"> - %s - </div>''' % a.get_html() - else: - self.select_address.add_option(a.desc, str(a.id)) + if self.user: + for a in self.user.addresses: + if not a.deleted: + if self.value == str(a.id): + self.select_address.add_option(a.desc, str(a.id), selected=True) + # display this address + address_html = '''<div class="form-row"> + %s + </div>''' % a.get_html() + else: + self.select_address.add_option(a.desc, str(a.id)) if self.value == 'new': self.select_address.add_option('Add a new address', 'new', selected=True) for field_name, label in self.fields(): diff -r 63e37852f658 -r 12e6192f6201 scripts/galaxy_messaging/amqp_consumer.py --- a/scripts/galaxy_messaging/amqp_consumer.py Mon Sep 21 10:46:36 2009 -0400 +++ b/scripts/galaxy_messaging/amqp_consumer.py Mon Sep 21 10:49:17 2009 -0400 @@ -1,3 +1,15 @@ +''' +Galaxy Messaging with AMQP (RabbitMQ) +Galaxy uses AMQ protocol to receive messages from external sources like +bar code scanners. Galaxy has been tested against RabbitMQ AMQP implementation. +For Galaxy to receive messages from a message queue the RabbitMQ server has +to be set up with a user account and other parameters listed in the [galaxy:amq] +section in the universe_wsgi.ini config file +Once the RabbitMQ server has been setup and started with the given parameters, +this script can be run to receive messages and update the Galaxy database accordingly +''' + + from amqplib import client_0_8 as amqp import ConfigParser import sys
participants (1)
-
Nate Coraor