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

fix(generic): use copy instead of working with the original field #1357

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

b1rger
Copy link
Contributor

@b1rger b1rger commented Nov 11, 2024

If we create fake_field by simply using getattr on the
annotations.items() we actually get the original field and then change
its name in the next line. But thats not what we want, because that
changes the field for the model it belongs to. We only want a temporary
field, so we can add it to the extra_columns.

Closes: #1346

If we create `fake_field` by simply using `getattr` on the
`annotations.items()` we actually get the original field and then change
its name in the next line. But thats not what we want, because that
changes the field for the model it belongs to. We only want a temporary
field, so we can add it to the `extra_columns`.

Closes: #1346
@b1rger b1rger marked this pull request as ready for review November 11, 2024 08:11
@b1rger b1rger requested a review from gythaogg November 11, 2024 08:11
Copy link
Contributor

@gythaogg gythaogg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow - this is perfect!

@b1rger b1rger merged commit 1fec441 into main Nov 11, 2024
13 checks passed
@b1rger b1rger deleted the birger/1346-copy-annotated-field branch November 11, 2024 11:14
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.

Annotated fields messing with ListViews
2 participants