[finish #27524965] fixed issue where released claim prevents new claim

pull/1/head
eric 2012-04-05 16:55:10 -04:00
parent 607a0d91b4
commit db736818fc
2 changed files with 4 additions and 3 deletions

View File

@ -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 %}

View File

@ -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):