From 3bc2ad83eacbf18e018d6124a41d03bda33236cf Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Fri, 3 Jun 2022 19:12:00 +0200 Subject: [PATCH] Remove some more letters from the alphabet --- app/models/order.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/order.py b/app/models/order.py index 7ae5de9..b5cc016 100644 --- a/app/models/order.py +++ b/app/models/order.py @@ -11,12 +11,12 @@ from utils import first from .database import db from .user import User -BASE34_ALPHABET = '123456789abcdefghijkmnopqrstuvwxyz' +BASE31_ALPHABET = '23456789abcdefghjkmnpqrstuvwxyz' def generate_slug(): - secret = ''.join(secrets.choice(BASE34_ALPHABET) for i in range(8)) + secret = ''.join(secrets.choice(BASE31_ALPHABET) for i in range(8)) while Order.query.filter(Order.slug == secret).first() is not None: - secret = ''.join(secrets.choice(BASE34_ALPHABET) for i in range(8)) + secret = ''.join(secrets.choice(BASE31_ALPHABET) for i in range(8)) return secret class Order(db.Model):