parent
2137dd8491
commit
bcca519d67
|
@ -1080,3 +1080,9 @@ class RfcdiffSupportTests(TestCase):
|
|||
# tricky draft names
|
||||
self.do_rfc_with_broken_history_test(draft_name='draft-gizmo-01')
|
||||
self.do_rfc_with_broken_history_test(draft_name='draft-oh-boy-what-a-draft-02-03')
|
||||
|
||||
def test_no_such_document(self):
|
||||
for name in ['rfc0000', 'draft-ftei-oof-rab-00']:
|
||||
url = urlreverse(self.target_view, kwargs={'name': name})
|
||||
r = self.client.get(url)
|
||||
self.assertEqual(r.status_code, 404)
|
||||
|
|
|
@ -327,7 +327,7 @@ def get_previous_url(name, rev=None):
|
|||
def rfcdiff_latest_json(request, name, rev=None):
|
||||
response = dict()
|
||||
condition, document, history, found_rev = find_doc_for_rfcdiff(name, rev)
|
||||
if document.type_id == "rfc":
|
||||
if document and document.type_id == "rfc":
|
||||
draft = document.came_from_draft()
|
||||
if condition == 'no such document':
|
||||
raise Http404
|
||||
|
|
Loading…
Reference in a new issue