fix generating json tag for enum

This commit is contained in:
Pavel Merzlyakov 2024-02-02 11:02:54 +03:00
parent bf96a68d58
commit aadd7a5a7c
1 changed files with 2 additions and 1 deletions

View File

@ -330,7 +330,8 @@ function add_twig_filters(\Twig\Environment $twig)
function(\mtgMetaField $field): string {
$tag = get_field_alias_or_name($field);
$type = $field->getType();
if($type instanceof \mtgBuiltinType && !$type->isString() && !$type->isBlob()) {
if($type instanceof \mtgMetaEnum ||
($type instanceof \mtgBuiltinType && !$type->isString() && !$type->isBlob())) {
return $tag.',string';
}
return $tag;