Skip to content

Commit d44d03b

Browse files
authored
fix nacl.secret import (#298)
1 parent 8f341a8 commit d44d03b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

piccolo_api/encryption/providers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ def __init__(self, encryption_key: bytes):
178178
@staticmethod
179179
def get_new_key() -> bytes:
180180
nacl_utils = get_nacl_utils()
181-
return nacl_utils.random(nacl.secret.Aead.KEY_SIZE) # type: ignore
181+
nacl_secret = get_nacl_secret()
182+
return nacl_utils.random(nacl_secret.Aead.KEY_SIZE) # type: ignore
182183

183184
def _get_nacl_box(self) -> nacl.secret.Aead:
184185
nacl_secret = get_nacl_secret()

0 commit comments

Comments
 (0)