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

πŸ§‘β€πŸ’»(user) fix the User.language #611

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

qbey
Copy link
Collaborator

@qbey qbey commented Dec 18, 2024

Purpose

The use of a lazy function here make the Django migration detector to generate a migration every time we run makemigrations.

Proposal

This is not mandatory to have a lazy here as the settings are loaded once at runtime beginning.
As the choices makes noop migrations, we directly use the setting in the initial migration.

  • remove the lazy function
  • update the initial migration

@qbey qbey self-assigned this Dec 18, 2024
@qbey qbey requested review from sdemagny and mjeammet December 18, 2024 16:46
@qbey qbey force-pushed the qbey/fix-user-language-many-migrations branch from c91c098 to 3d64c88 Compare December 18, 2024 16:47
Copy link
Member

@mjeammet mjeammet left a comment

Choose a reason for hiding this comment

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

Hallelujah !

No changelog ? Looks like a fix to me !

@qbey
Copy link
Collaborator Author

qbey commented Dec 18, 2024

Hallelujah !

No changelog ? Looks like a fix to me !

It changes nothing actually ^^ but OK, I will add a changelog before merge :)

The use of a lazy function here make the Django migration
detector to generate a migration every time we run `makemigrations`.
This is not mandatory to have a lazy here as the settings are loaded
once at runtime beginning.
As the choices makes noop migrations, we directly use the setting in
the initial migration.
@qbey qbey force-pushed the qbey/fix-user-language-many-migrations branch from 3d64c88 to c3007fd Compare December 19, 2024 21:08
@qbey qbey enabled auto-merge (rebase) December 19, 2024 21:08
@qbey qbey merged commit 469014a into main Dec 19, 2024
20 checks passed
@qbey qbey deleted the qbey/fix-user-language-many-migrations branch December 19, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants