Closed
Description
Hi,
We run into this problem when using a CharField with choices, but only on the first choice, and the error disappears when we surround the value of the charfield by double underscores:
# this does not work, whatever you choose to set in place of percentage ...
PERCENTAGE = "percentage",
AMOUNT = "amount"
DEAL_TYPES = (
(PERCENTAGE, "percentage"),
(AMOUNT, "amount"),
)
# ... unless you use '__':
PERCENTAGE = "__percentage__",
AMOUNT = "amount"
DEAL_TYPES = (
(PERCENTAGE, "__percentage__"),
(AMOUNT, "amount"),
)
# [...]
type_of_deal = CharField(max_length=14,
choices=DEAL_TYPES)
Tested on 2 different machines (both MacOS)
graphene==1.2
graphene-django==1.2.1
graphql-core==1.0.1
graphql-relay==0.4.5