details: http://www.bx.psu.edu/hg/galaxy/rev/44366a1123b0 changeset: 3614:44366a1123b0 user: rc date: Tue Apr 06 09:24:33 2010 -0400 description: lims: delete/undelete request bug fixed. all samples are also deleted when a request is deleted. diffstat: lib/galaxy/web/controllers/requests.py | 8 ++++++++ lib/galaxy/web/controllers/requests_admin.py | 8 ++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diffs (50 lines): diff -r 6f7528445c64 -r 44366a1123b0 lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Mon Apr 05 15:11:04 2010 -0400 +++ b/lib/galaxy/web/controllers/requests.py Tue Apr 06 09:24:33 2010 -0400 @@ -924,6 +924,10 @@ else: request.deleted = True trans.sa_session.add( request ) + # delete all the samples belonging to this request + for s in request.samples: + s.deleted = True + trans.sa_session.add( s ) trans.sa_session.flush() if not len(delete_failed): message = '%i request(s) has been deleted.' % len(id_list) @@ -951,6 +955,10 @@ **kwd) ) request.deleted = False trans.sa_session.add( request ) + # undelete all the samples belonging to this request + for s in request.samples: + s.deleted = False + trans.sa_session.add( s ) trans.sa_session.flush() return trans.response.send_redirect( web.url_for( controller='requests', action='list', diff -r 6f7528445c64 -r 44366a1123b0 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Mon Apr 05 15:11:04 2010 -0400 +++ b/lib/galaxy/web/controllers/requests_admin.py Tue Apr 06 09:24:33 2010 -0400 @@ -385,6 +385,10 @@ **kwd) ) request.deleted = True trans.sa_session.add( request ) + # delete all the samples belonging to this request + for s in request.samples: + s.deleted = True + trans.sa_session.add( s ) trans.sa_session.flush() message = '%i request(s) has been deleted.' % len(id_list) status = 'done' @@ -407,6 +411,10 @@ **kwd) ) request.deleted = False trans.sa_session.add( request ) + # undelete all the samples belonging to this request + for s in request.samples: + s.deleted = False + trans.sa_session.add( s ) trans.sa_session.flush() return trans.response.send_redirect( web.url_for( controller='requests_admin', action='list',