-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
ad044e4
commit bb82834
Showing
4 changed files
with
8 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters