[finish #27524965] fixed issue where released claim prevents new claim
parent
607a0d91b4
commit
db736818fc
|
@ -10,9 +10,9 @@
|
|||
<li>Title: <a href="{% url work work.id %}">{{ work.title }}</a></li>
|
||||
<li>Author: {{ work.author }}</li>
|
||||
</ul>
|
||||
{% if work.claim.count %}
|
||||
{% if active_claims.count %}
|
||||
|
||||
{% for otherclaim in work.claim.all %}
|
||||
{% for otherclaim in active_claims %}
|
||||
{% ifequal rights_holder.id otherclaim.rights_holder.id %}
|
||||
<p><a href="{% url work work.id %}">This work</a> has already been claimed by {{ rights_holder.rights_holder_name }}</p>
|
||||
{% else %}
|
||||
|
|
|
@ -793,7 +793,8 @@ def claim(request):
|
|||
else:
|
||||
work = models.Work.objects.get(id=data['claim-work'])
|
||||
rights_holder = models.RightsHolder.objects.get(id=data['claim-rights_holder'])
|
||||
context = {'form': form, 'work': work, 'rights_holder':rights_holder }
|
||||
active_claims = work.claim.exclude(status = 'release')
|
||||
context = {'form': form, 'work': work, 'rights_holder':rights_holder , 'active_claims':active_claims}
|
||||
return render(request, "claim.html", context)
|
||||
|
||||
def rh_tools(request):
|
||||
|
|
Loading…
Reference in New Issue