use a string, not bytes

This commit is contained in:
mcbloch 2022-06-01 17:36:52 +02:00
parent 2bdd07c9af
commit 5d204a4012

View file

@ -11,8 +11,7 @@ from utils import first
from .database import db from .database import db
from .user import User from .user import User
BASE58_ALPHABET = \ BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
b'123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
def generate_slug(): def generate_slug():
secret = ''.join(secrets.choice(BASE58_ALPHABET) for i in range(7)) secret = ''.join(secrets.choice(BASE58_ALPHABET) for i in range(7))