-
-
Notifications
You must be signed in to change notification settings - Fork 24
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 pre and post clone save signals #680
Conversation
Codecov Report
@@ Coverage Diff @@
## main #680 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 288 290 +2
=========================================
+ Hits 288 290 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
slug=slugify(name), | ||
published_at=first_published_at, | ||
) | ||
assert book.published_at == first_published_at |
Check warning
Code scanning / Bandit (reported by Codacy)
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
assert book.published_at == first_published_at | ||
edition = Edition.objects.create(seq=1, book=book) | ||
cloned_edition = edition.make_clone() | ||
assert cloned_edition.seq == 2 |
Check warning
Code scanning / Bandit (reported by Codacy)
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
cloned_edition = edition.make_clone() | ||
assert cloned_edition.seq == 2 | ||
book.refresh_from_db() | ||
assert book.published_at != first_published_at |
Check warning
Code scanning / Bandit (reported by Codacy)
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
4f020e8
to
29677e9
Compare
@yuekui Thanks for the update much appreciated |
So we could potentially get rid of
pre_save_duplicate
and keep flexible.Also removed the 2nd
save()
since we've moved__duplicate_m2o_fields
before saving.