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: don't share default values in ArchiveField #67

Merged
merged 1 commit into from
Aug 16, 2023

Commits on Aug 16, 2023

  1. fix: don't share default values in ArchiveField

    Passing an object as the default value to `ArchiveField` (such as `{}`)
    means that we always return the same reference to multiple objects. So they're shared.
    (thanks @scott-codecov for pointing that out)
    
    So instead we will pass a class and call the class, creating a new object if we have to use it.
    Noticed I hacked it a little for the default of the defaults to return `None`.
    We can do the same if we ever need more complex values, or just create a new class.
    
    I also moved the log of dbfield and archive_field None to be DEBUG and not INFO.
    We are getting that quite a lot and it's making support's work hard.
    giovanni-guidini committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    bb82834 View commit details
    Browse the repository at this point in the history