bdragon300 / mongoengine-migrate

Migrations for MongoEngine inspired by Django
Apache License 2.0
17 stars 5 forks source link

Handling `EnumField` choices #45

Open prihoda opened 3 years ago

prihoda commented 3 years ago

Hi all,

I noticed that EnumField choices are rendered like this:

    CreateField('~MyEnumField', 'type',
        choices=(<MyEnum.MYVALUE: 'My value'>, <MyEnum.OTHERVALUE: 'Other value'>),
        ...
    )

I would expect something like this (along with the necessary import):

        choices=(MyEnum.MYVALUE, MyEnum.OTHERVALUE),
23pointsNorth commented 2 years ago

I am hitting the same issue. Is there a way forward?