File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -558,10 +558,12 @@ def test_archive_success(self):
558558 continue
559559 for file_response in response_block .response :
560560 file_sha = file_response ['file_hashes' ]['sha256' ]
561- originating_node = Guid .objects .get (_id = node_index [file_sha ]).referent
562- parent_registration = originating_node .registrations .get ()
563- assert originating_node ._id not in file_response ['file_urls' ]['html' ]
564- assert parent_registration ._id in file_response ['file_urls' ]['html' ]
561+ if file_sha in node_index :
562+ originating_node = Guid .objects .get (_id = node_index [file_sha ]).referent
563+ parent_registration = originating_node .registrations .get ()
564+ assert originating_node ._id not in file_response ['file_urls' ]['html' ]
565+ assert parent_registration ._id in file_response ['file_urls' ]['html' ]
566+
565567 registration_files .add (file_sha )
566568
567569 assert registration_files == set (selected_files .keys ())
You can’t perform that action at this time.
0 commit comments