mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-08-02 11:10:11 +03:00
fix enum
This commit is contained in:
parent
c687898484
commit
dea45b896d
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -63,3 +63,6 @@ cover/
|
||||||
|
|
||||||
# tox
|
# tox
|
||||||
.tox/
|
.tox/
|
||||||
|
venv/
|
||||||
|
*.xml
|
||||||
|
.idea/
|
||||||
|
|
|
@ -498,6 +498,7 @@ class BaseEnumField(Field):
|
||||||
'''
|
'''
|
||||||
import re
|
import re
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
db_type = db_type.replace("\\", "")
|
||||||
members = {}
|
members = {}
|
||||||
for match in re.finditer(r"'([\w ]+)' = (-?\d+)", db_type):
|
for match in re.finditer(r"'([\w ]+)' = (-?\d+)", db_type):
|
||||||
members[match.group(1)] = int(match.group(2))
|
members[match.group(1)] = int(match.group(2))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user