-
Notifications
You must be signed in to change notification settings - Fork 420
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
Reorder condition in get_field_value function #652
Conversation
…n-database fields and this will break their code ;)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #652 +/- ##
==========================================
+ Coverage 95.21% 95.29% +0.07%
==========================================
Files 31 31
Lines 1025 1042 +17
==========================================
+ Hits 976 993 +17
Misses 49 49 ☔ View full report in Codecov by Sentry. |
Thanks @GreatBahram for this PR.
|
Hi there, I thought it would be beneficial to check the This change was disrupting our codebase. We had several non-database fields that functioned correctly before updating the auditlog. The workaround for us was to set the |
Agree, that make sense to check the |
@@ -2164,6 +2164,19 @@ def test_log_entry_created_if_obj_strings_are_same_for_two_objs(self): | |||
self.assertEqual(int(log_create.changes_dict["related"][1]), one_simple.id) | |||
self.assertEqual(int(log_update.changes_dict["related"][1]), two_simple.id) | |||
|
|||
def test_rel_class_checked_first(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to create a model as you described in the PR description and test with a real model instead of mocking
Co-authored-by: Hasan Ramezani <[email protected]>
Hi there, while working on the test case and investigating Django non-database fields reached this conclusion we should have set |
Hello there,
Some projects have their own fields that are not connected to any model. With the previous approach, the code would have broken, but with this order, it will consider those too. What do you think?