Quick fix for crash when going to /wg/imapmove/charter/. I'm not happy about the 'charter-ietf-' constant which now appears several places in the code; we need settings which defines the correct name pattern for different document types (or a table or table column, maybe). But this hopefully will make it possible to continue processing proposed WGs ...

- Legacy-Id: 4459
This commit is contained in:
Henrik Levkowetz 2012-06-14 20:32:35 +00:00
parent fde5387f7a
commit 802ee2905d
2 changed files with 4 additions and 2 deletions

View file

@ -72,7 +72,7 @@ is occasionally incorrect.</span>
{% else %}
none
{% if user|has_role:"Area Director,Secretariat" %}
- <a href="{% url wgcharter.views_submit.submit name=wg.acronym %}">Submit Charter</a>
- <a href="{% url wgcharter.views.submit acronym=wg.acronym %}">Submit Charter</a>
{% endif %}
{% endif %}
</td>

View file

@ -287,7 +287,9 @@ class UploadForm(forms.Form):
destination.write(self.cleaned_data['content'])
@role_required('Area Director','Secretariat')
def submit(request, name, option=None):
def submit(request, name=None, acronym=None, option=None):
if acronym and not name:
name = "charter-ietf-" + acronym
charter = get_object_or_404(Document, type="charter", name=name)
wg = charter.group