[fix #39700567] Return a rightsholder name regardless of status of Campaign
parent
984e3d465a
commit
279399e9b5
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue