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 signature of ModelAdmin.construct_change_message #2444

Merged
merged 2 commits into from
Nov 17, 2024

Conversation

youtux
Copy link
Contributor

@youtux youtux commented Nov 15, 2024

The form argument was incorrectly typed.

The `form` argument was incorrectly typed.
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Why do you think so? Is this documented? There's also one more place in admin/utils.py where the same type is used.

@youtux
Copy link
Contributor Author

youtux commented Nov 15, 2024

The method belongs to generic ModelAdmin class; it makes no sense for it to take an AdminPasswordChange form. The implementation just require any instance of Form

@sobolevn
Copy link
Member

Got it, please address the second comment :)

@youtux
Copy link
Contributor Author

youtux commented Nov 17, 2024

Done in 605cddf 80f199f

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks!

@sobolevn sobolevn merged commit c4bb911 into typeddjango:master Nov 17, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants