don't return error for empty claim
parent
007307f411
commit
5598b154c5
|
@ -4,6 +4,7 @@
|
|||
{% block doccontent %}
|
||||
|
||||
<h2>Rights Holder Claim Form </h2>
|
||||
{% if work %}
|
||||
<h3> Rightsholder making claim </h3>
|
||||
{{ rights_holder.rights_holder_name }}
|
||||
<h3> Work being claimed </h3>
|
||||
|
@ -42,4 +43,7 @@
|
|||
<input type="submit" name="submit" value="Confirm Claim">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Please find a work to claim.
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -35,7 +35,7 @@ urlpatterns = [
|
|||
url(r"^rightsholders/campaign/(?P<id>\d+)/mademobi/$", views.manage_campaign, {'action': 'mademobi'}, name="mademobi"),
|
||||
url(r"^rightsholders/edition/(?P<work_id>\d*)/(?P<edition_id>\d*)$", views.edit_edition, {'by': 'rh'}, name="rh_edition"),
|
||||
url(r"^rightsholders/edition/(?P<edition_id>\d*)/upload/$", views.edition_uploads, name="edition_uploads"),
|
||||
url(r"^rightsholders/claim/$", views.claim, name="claim"),
|
||||
url(r"^rightsholders/claim/$", login_required(views.claim), name="claim"),
|
||||
url(r"^rightsholders/surveys/$", views.surveys, name="surveys"),
|
||||
url(r"^rightsholders/new_survey/(?P<work_id>\d*)/?$", views.new_survey, name="new_survey"),
|
||||
url(r"^rightsholders/surveys/answers_(?P<qid>\d+)_(?P<work_id>\d*).csv$", views.export_surveys, name="survey_answers"),
|
||||
|
|
|
@ -88,6 +88,8 @@ class ClaimView(CreateView):
|
|||
return HttpResponseRedirect(reverse('rightsholders'))
|
||||
|
||||
def get_context_data(self, form):
|
||||
if not form.is_valid():
|
||||
return {'form': form}
|
||||
work = form.cleaned_data['work']
|
||||
rights_holder = form.cleaned_data['rights_holder']
|
||||
active_claims = work.claim.exclude(status = 'release')
|
||||
|
|
Loading…
Reference in New Issue