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

Fixed #35344 -- Corrected output_field of resolved columns of table alias for GeneratedFields. #18034

Merged
merged 1 commit into from Apr 2, 2024

Conversation

us77ipis
Copy link
Contributor

@us77ipis us77ipis commented Mar 30, 2024

Trac ticket number

ticket-35344

Branch description

For generated fields, get_col gets called with output_field=<instance of the generated field>. Consequently, if an alias is specified, the output_field of the generated Col is of type GeneratedField instead of the actual output_field of the GeneratedField, since the previous code only handled the case where get_col's output_field parameter is None, but not when it is self.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • For UI changes, I have attached screenshots in both light and dark modes.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello! Thank you for your contribution 💪

As it's your first contribution be sure to check out the patch review checklist.

If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!

If you have any design or process questions then you can ask in the Django forum.

Welcome aboard ⛵️!

@us77ipis
Copy link
Contributor Author

I added a mention to the 5.0.4 release notes.

Copy link
Contributor

@nessita nessita left a comment

Choose a reason for hiding this comment

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

Thank you @us77ipis for this work.

I wanted to commit and push a small rewording to the release note and commit message, but it seems that the PR is blocked to allow pushes from maintainers.

Could you please apply the suggestion I made for the release note, and change the commit message to be:

Fixed #35344, Refs #34838 -- Corrected output_field of resolved columns for GeneratedFields in aliased tables.
    
Thanks Simon Charette for the review.

docs/releases/5.0.4.txt Outdated Show resolved Hide resolved
…ns for GeneratedFields in aliased tables.

Thanks Simon Charette for the review.
@nessita
Copy link
Contributor

nessita commented Apr 1, 2024

buildbot, test on oracle.

@nessita nessita merged commit 5f18021 into django:main Apr 2, 2024
37 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
3 participants