From a721d4c97a6463864bb80f7fdecd919fdfcdc78a Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Wed, 21 Feb 2024 13:43:31 +0100 Subject: [PATCH] Import only black3 submodule --- archivist/apps/files/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archivist/apps/files/views.py b/archivist/apps/files/views.py index 6d042e5..3a96eba 100644 --- a/archivist/apps/files/views.py +++ b/archivist/apps/files/views.py @@ -5,7 +5,7 @@ from django.http import FileResponse, HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render import os -import blake3 +from blake3 import blake3 from .forms import UploadFileForm from .models import User_Banner_Images, User_Profile_Images, Metadata_Files, Submission_File @@ -23,7 +23,7 @@ def compute_file_hash(file): Compute BLAKE3 hash of the file ''' try: - hasher = blake3.blake3() + hasher = blake3() for chunk in file.chunks(chunk_size=65536): hasher.update(chunk) return hasher.hexdigest()