Switch to Enum (#3437)

This commit is contained in:
Matthias Mair 2022-07-31 01:21:09 +02:00 committed by GitHub
parent 2ad0fa11f8
commit 486a956f42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ import math
import os
import uuid
from datetime import datetime, timedelta
from enum import Enum
from secrets import compare_digest
from django.apps import apps
@ -1805,9 +1806,8 @@ class ColorTheme(models.Model):
return False
class VerificationMethod:
class VerificationMethod(Enum):
"""Class to hold method references."""
NONE = 0
TOKEN = 1
HMAC = 2