galaxy-dist commit 42a4c30c7486: More bug fixes for the job wrapper user property.
# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Nate Coraor <nate@bx.psu.edu> # Date 1277395476 14400 # Node ID 42a4c30c7486b95ff8ce9c5fec116e76855996c7 # Parent a9afce9276da25ad1a56c185016fa19ecf242ccb More bug fixes for the job wrapper user property. --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -712,12 +712,16 @@ class JobWrapper( object ): @property def user( self ): job = self.sa_session.query( model.Job ).get( self.job_id ) - if job.user is None and job.galaxy_session is not None: + if job.user is not None: + return job.user.email + elif job.galaxy_session is not None and job.galaxy_session.user is not None: + return job.galaxy_session.user.email + elif job.history is not None and job.history.user is not None: + return job.history.user.email + elif job.galaxy_session is not None: return 'anonymous@' + job.galaxy_session.remote_addr.split()[-1] - elif job.user is None: + else: return 'anonymous@unknown' - else: - return job.history.user.email class DefaultJobDispatcher( object ): def __init__( self, app ):
participants (1)
-
commits-noreply@bitbucket.org