[fix #39700567] Return a rightsholder name regardless of status of Campaign

pull/1/head
Raymond Yee 2012-11-16 08:52:54 -08:00
parent 984e3d465a
commit 279399e9b5
1 changed files with 4 additions and 8 deletions

View File

@ -491,15 +491,11 @@ class Campaign(models.Model):
def rightsholder(self):
"""returns the name of the rights holder for an active or initialized campaign"""
try:
# BUGBUG: why should the RH be dependent on the status of a campaign?
# for the moment, I'll extend this logic to include 'SUCCESSFUL' campaigns too
if self.status in ('ACTIVE', 'INITIALIZED', 'SUCCESSFUL'):
q = Q(status='ACTIVE') | Q(status='INITIALIZED')
rh = self.work.claim.filter(q)[0].rights_holder.rights_holder_name
return rh
q = Q(status='ACTIVE') | Q(status='INITIALIZED')
rh = self.work.claim.filter(q)[0].rights_holder.rights_holder_name
return rh
except:
pass
return ''
return ''
@property
def license_url(self):