[hg] galaxy 2992: code cleanup.. removed unused methods
details: http://www.bx.psu.edu/hg/galaxy/rev/8f47f31eb196 changeset: 2992:8f47f31eb196 user: rc date: Mon Nov 09 16:29:27 2009 -0500 description: code cleanup.. removed unused methods diffstat: lib/galaxy/web/controllers/requests.py | 39 ------------------- lib/galaxy/web/controllers/requests_admin.py | 38 ------------------- 2 files changed, 0 insertions(+), 77 deletions(-) diffs (97 lines): diff -r 4e1101dc2f25 -r 8f47f31eb196 lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Mon Nov 09 16:18:39 2009 -0500 +++ b/lib/galaxy/web/controllers/requests.py Mon Nov 09 16:29:27 2009 -0500 @@ -838,45 +838,6 @@ **kwd) ) @web.expose @web.require_login( "create/submit sequencing requests" ) - def submit_request(self, trans, **kwd): - params = util.Params( kwd ) - try: - id = int(params.get('id', False)) - request = trans.sa_session.query( trans.app.model.Request ).get( id ) - except: - msg = "Invalid request ID" - log.warn( msg ) - return trans.response.send_redirect( web.url_for( controller='requests', - action='list', - status='error', - message=msg, - **kwd) ) - msg = self.__validate(trans, request) - if msg: - return trans.response.send_redirect( web.url_for( controller='requests', - action='edit', - messagetype = 'error', - msg=msg, - request_id=request.id, - show='True') ) - # get the new state - new_state = request.type.states[0] - for s in request.samples: - event = trans.app.model.SampleEvent(s, new_state, 'Samples submitted to the system') - event.flush() - # change request's submitted field - request.state = request.states.SUBMITTED - request.flush() - kwd['id'] = trans.security.encode_id(request.id) - kwd['status'] = 'done' - kwd['message'] = 'The request <b>%s</b> has been submitted.' % request.name - return trans.response.send_redirect( web.url_for( controller='requests', - action='list', - show_filter=trans.app.model.Request.states.SUBMITTED, - **kwd) ) - - @web.expose - @web.require_login( "create/submit sequencing requests" ) def show_events(self, trans, **kwd): params = util.Params( kwd ) try: diff -r 4e1101dc2f25 -r 8f47f31eb196 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Mon Nov 09 16:18:39 2009 -0500 +++ b/lib/galaxy/web/controllers/requests_admin.py Mon Nov 09 16:29:27 2009 -0500 @@ -658,44 +658,6 @@ **new_kwd) ) elif params.get('refresh', False) == 'true': return self.__edit_request(trans, request.id, **kwd) - @web.expose - @web.require_admin - def submit_request(self, trans, **kwd): - params = util.Params( kwd ) - try: - id = int(params.get('id', False)) - request = trans.sa_session.query( trans.app.model.Request ).get( id ) - except: - msg = "Invalid request ID" - log.warn( msg ) - return trans.response.send_redirect( web.url_for( controller='requests_admin', - action='list', - status='error', - message=msg, - **kwd) ) - msg = self.__validate(trans, request) - if msg: - return trans.response.send_redirect( web.url_for( controller='requests_admin', - action='edit', - messagetype='error', - msg=msg, - request_id=request.id, - show='True') ) - # get the new state - new_state = request.type.states[0] - for s in request.samples: - event = trans.app.model.SampleEvent(s, new_state, 'Samples submitted to the system') - event.flush() - # change request's submitted field - request.state = request.states.SUBMITTED - request.flush() - kwd['id'] = trans.security.encode_id(request.id) - kwd['status'] = 'done' - kwd['message'] = 'The request <b>%s</b> has been submitted.' % request.name - return trans.response.send_redirect( web.url_for( controller='requests_admin', - action='list', - show_filter=trans.app.model.Request.states.SUBMITTED, - **kwd) ) def __reject_request(self, trans, id): try: request = trans.sa_session.query( trans.app.model.Request ).get( id )
participants (1)
-
Greg Von Kuster