Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes '<attribute>' and '<attribute>_id' conflict. #1709

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CodeMeister
Copy link

@CodeMeister CodeMeister commented Oct 28, 2024

Fixes: #1680
Fixes: #1142

Addresses: #1708

When a factory has both <attribute> and <attribute>_id, each one is considered an alias for the other
and are not assigned correctly.

This requests eliminates this issue by checking if the override is an existing attribute name, before matching against an alias.

  • AttributeAssigner refactored to ignore a matching attribute alias, if it also matches the name of another attribute.
  • Renamed two methods to give more clarity to their purpose.
  • Tests added for attribute assignment.

It works for any recorded aliases, not just '_id'.

  - AttributeAssigner refactored to ignore a
    matching attribute alias, if it also
    matches the name of another attribute.

  - Tests added for attribute assignment.
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.

Do not overwrite the dafault value Confusion around aliases for {attribute} and {attribute}_id
1 participant