This commit is contained in:
riyce 2022-12-08 14:30:41 +03:00
parent c687898484
commit dea45b896d
2 changed files with 4 additions and 0 deletions

3
.gitignore vendored
View File

@ -63,3 +63,6 @@ cover/
# tox
.tox/
venv/
*.xml
.idea/

View File

@ -498,6 +498,7 @@ class BaseEnumField(Field):
'''
import re
from enum import Enum
db_type = db_type.replace("\\", "")
members = {}
for match in re.finditer(r"'([\w ]+)' = (-?\d+)", db_type):
members[match.group(1)] = int(match.group(2))