commit/galaxy-central: natefoo: Quota display nice_size bugfixes.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/59beb8e9290d/ changeset: 59beb8e9290d user: natefoo date: 2011-08-18 20:01:28 summary: Quota display nice_size bugfixes. affected #: 1 file (72 bytes) --- a/lib/galaxy/quota/__init__.py Thu Aug 18 13:51:02 2011 -0400 +++ b/lib/galaxy/quota/__init__.py Thu Aug 18 14:01:28 2011 -0400 @@ -60,11 +60,13 @@ use_default = True max = 0 adjustment = 0 + rval = 0 for quota in quotas: if quota.deleted: continue if quota.operation == '=' and quota.bytes == -1: - return None + rval = None + break elif quota.operation == '=': use_default = False if quota.bytes > max: @@ -76,16 +78,17 @@ if use_default: max = self.default_registered_quota if max is None: - return None - quota = max + adjustment - if quota <= 0: - quota = 0 + rval = None + if rval is not None: + rval = max + adjustment + if rval <= 0: + rval = 0 if nice_size: - if quota is not None: - quota = util.nice_size( quota ) + if rval is not None: + rval = util.nice_size( rval ) else: - quota = 'unlimited' - return quota + rval = 'unlimited' + return rval @property def default_unregistered_quota( self ): return self._default_quota( self.model.DefaultQuotaAssociation.types.UNREGISTERED ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket