-
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
Add ability to globally exclude fields by name on all models #498
Add ability to globally exclude fields by name on all models #498
Conversation
Codecov Report
@@ Coverage Diff @@
## master #498 +/- ##
==========================================
- Coverage 94.16% 94.07% -0.10%
==========================================
Files 30 30
Lines 891 894 +3
==========================================
+ Hits 839 841 +2
- Misses 52 53 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks @darkpixel for this patch. You need to consider:
|
docs/source/usage.rst
Outdated
"modified" | ||
) | ||
|
||
.. versionadded:: 2.2.3 |
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.
.. versionadded:: 2.2.3 | |
.. versionadded:: 3.0.0 |
Thanks @hramezani I should be able to get those changed pushed later today! |
Great @darkpixel |
The pre-commit hook that reformats code is a huge pain in the rear. I made some changes, pushed, then continued working on test cases and went to push....and it was rejected because my fork/branch has changes. Spent 10 minutes trying to clean up/rebase a bunch of code the bot reformatted out from under me...thought I had it fixed, committed and pushed....and the bot changed things out from under me again. 😠 |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
58685fa
to
6a127d3
Compare
Something's not making sense to me with the test framework. I verified that the changes I've made actually work in my production application--fields listed in But given this test case, they are being logged:
I've poked through all the tests, and it seems like it should be working...but my guess is |
@darkpixel Thanks for your update. Your branch is protected and I am not allowed to push to your PR. Could you please allow me? I've fixed the problem and want to push. |
Added! |
for more information, see https://pre-commit.ci
@darkpixel Thanks! Please check my changes and if it is ok for you, I will merge it |
Aah--that's what I was missing. Do I need to go into any more depth on the tests? i.e. create a model, change an excluded field, and then check to make sure it wasn't saved as part of the changes dict? |
No, I think it is enough to test it at this level. no need to go deeper |
My first stab at solving #467.
Adds the ability to list field names in
AUDITLOG_EXCLUDE_TRACKING_MODELS
that will be excluded from logging.If a field in
AUDITLOG_EXCLUDE_TRACKING_MODELS
is the only field changed, nothing will be logged.