Skip to content

Commit

Permalink
Verify AIP: fix checksum verification
Browse files Browse the repository at this point in the history
When verifying checksums, omit files listed under the file group
`manualNormalization`.

This is connected to #287.
  • Loading branch information
sevein committed Oct 20, 2018
1 parent 8e24b3b commit 89dfc80
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MCPClient/lib/clientScripts/verify_aip.py
Expand Up @@ -163,7 +163,12 @@ def verify_checksums(job, bag, sip_uuid):
verification_count = 0
verification_skipped_because_reingest = 0
for file_ in File.objects.filter(sip_id=sip_uuid):
if (os.path.basename(file_.originallocation) in removableFiles) or (not file_.currentlocation.startswith('%SIPDirectory%objects/')):
if (
os.path.basename(file_.originallocation) in removableFiles or
not file_.currentlocation.startswith(
'%SIPDirectory%objects/') or
file_.filegrpuse == 'manualNormalization'
):
continue
file_path = file_.currentlocation.replace('%SIPDirectory%', '', 1)
assert_checksum_types_match(job, file_, sip_uuid, checksum_type)
Expand Down

0 comments on commit 89dfc80

Please sign in to comment.