Merge branch '34-der-code-soll-nur-aus-zahlen-bestehen' into 'master'
Resolve "Der Code soll nur aus Zahlen bestehen!" Closes #34 See merge request enrichment-2024/qivip!10
This commit is contained in:
@@ -16,7 +16,7 @@ class QuizGame(models.Model):
|
||||
|
||||
def generate_unique_code(self):
|
||||
for i in range(10):
|
||||
new_code = ''.join(random.choices(string.ascii_letters + string.digits, k=6))
|
||||
new_code = ''.join(random.choices(string.digits, k=6))
|
||||
if not QuizGame.objects.filter(join_code=new_code).exists():
|
||||
return new_code
|
||||
|
||||
|
||||
Reference in New Issue
Block a user