Skip to content

fix: unwrap NewType in auto-form map_type? check#475

Merged
zachdaniel merged 1 commit into
mainfrom
fix/map-newtype-form-args
May 20, 2026
Merged

fix: unwrap NewType in auto-form map_type? check#475
zachdaniel merged 1 commit into
mainfrom
fix/map-newtype-form-args

Conversation

@sevenseacat

Copy link
Copy Markdown
Contributor

Managed-relationship arguments typed as Ash.Type.NewType with subtype_of: :map were being filtered out of auto-generated forms because map_type?/1 only matched explicit map types.

The NewType is now unwrapped, so the underlying subtype is checked.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

Managed-relationship arguments typed as `Ash.Type.NewType` with
`subtype_of: :map` were being filtered out of auto-generated forms
because `map_type?/1` only matched explicit map types.

The `NewType` is now unwrapped, so the underlying subtype is checked.
@zachdaniel zachdaniel merged commit 7100450 into main May 20, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants