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 unnecessary log when adding already existed m2m record #535

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

firtk
Copy link
Contributor

@firtk firtk commented Jun 19, 2023

In log_m2m_changes we are checking the queryset emptiness with is not None however this will always evaluate to True. So when we are adding same related m2m object there will be an unnecessary log with empty objects. This PR aim is to fix that so we don't get unnecessary logs.

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #535 (150ac93) into master (4559146) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #535      +/-   ##
==========================================
+ Coverage   94.23%   94.34%   +0.11%     
==========================================
  Files          30       30              
  Lines         902      902              
==========================================
+ Hits          850      851       +1     
+ Misses         52       51       -1     
Impacted Files Coverage Δ
auditlog/models.py 89.64% <100.00%> (+0.39%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hramezani hramezani merged commit 7f2a3e3 into jazzband:master Jun 21, 2023
@hramezani
Copy link
Member

Thanks @firtk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants