Closed malinich closed 5 years ago
Thanks for your product. It helps much.
In admin-panel some list resources that have enum property
class AuthConfirmType(enum.Enum): SMS = "СМС" BIRTH_DAY = "Дата рождения" settings = sa.Table( "settings", meta, sa.Column("id", sa.Integer(), primary_key=True), ..... sa.Column( "auth_confirm_by", sa.Enum(AuthConfirmType), nullable=True, ) )
In admin-panel I catch error on detail-action. if I change enums on this (add str )
str
class AuthConfirmType(str, enum.Enum): SMS = "СМС" BIRTH_DAY = "Дата рождения"
I will catch misleading value, that no will use properly.
To hook this misbehavior need override jsonEncoder, but in PGResource I can't use mixins, ( only copy-paste, It's pain
PGResource
Thanks for your product. It helps much.
Scope
In admin-panel some list resources that have enum property
Prerequisites
Description
In admin-panel I catch error on detail-action. if I change enums on this (add
str
)I will catch misleading value, that no will use properly.
To hook this misbehavior need override jsonEncoder, but in
PGResource
I can't use mixins, ( only copy-paste, It's pain