Add err handling

This commit is contained in:
zandercymatics 2024-06-24 13:18:37 -06:00
parent aa1958c143
commit 5fe084cdab
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -72,6 +72,10 @@ class Command(BaseCommand):
# override = settings.SECRET_ENCRYPT_METADATA is None and not settings.IS_PRODUCTION
# password = "devpwd" if override else settings.SECRET_ENCRYPT_METADATA
password = settings.SECRET_ENCRYPT_METADATA
if not password:
raise ValueError(
"No password was specified for this zip file."
)
encrypted_zip_in_bytes = self.get_encrypted_zip(zip_filename, reports, password)