Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Form] Improve handling of unset attributes when using "group_by" on entity field type #5494

Copy link
Copy link
Closed
@cmorellirv

Description

@cmorellirv
Issue body actions

When using the "group_by" option on the entity field type, it correctly groups choices together under an empty optgroup when the "group_by" property path doesn't exist (when an InvalidPropertyException is thrown).

However, when the property does exist on the entity, but the value is null, the PropertyPath class throws an UnexpectedTypeException, which isn't caught by the ObjectChoiceList class.

The UnexpectedTypeException seems to be the correct exception to be thrown (given the purpose of the PropertyPath class), so maybe this should be caught by the field type class?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.