Revision b3155065 snf-pithos-app/pithos/api/functions.py

b/snf-pithos-app/pithos/api/functions.py
886 886
        raise RequestEntityTooLarge('Quota exceeded')
887 887
    if not checksum and UPDATE_MD5:
888 888
        # Update the MD5 after the hashmap, as there may be missing hashes.
889
        checksum = hashmap_md5(request, hashmap, size)
889
        checksum = hashmap_md5(request.backend, hashmap, size)
890 890
        try:
891
            version_id = request.backend.update_object_checksum(request.user_uniq,
892
                            v_account, v_container, v_object, version_id, checksum)
891
            request.backend.update_object_checksum(request.user_uniq,
892
              v_account, v_container, v_object, version_id, checksum)
893 893
        except NotAllowedError:
894 894
            raise Forbidden('Not allowed')
895 895
    if public is not None:
......
1187 1187
    if dest_bytes is not None and dest_bytes < size:
1188 1188
        size = dest_bytes
1189 1189
        hashmap = hashmap[:(int((size - 1) / request.backend.block_size) + 1)]
1190
    checksum = hashmap_md5(request, hashmap, size) if UPDATE_MD5 else ''
1190
    checksum = hashmap_md5(request.backend, hashmap, size) if UPDATE_MD5 else ''
1191 1191
    try:
1192 1192
        version_id = request.backend.update_object_hashmap(request.user_uniq,
1193 1193
                        v_account, v_container, v_object, size, prev_meta['type'],

Also available in: Unified diff