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

[Bug] PortalViewCount bulk create fails #463

Open
injoonH opened this issue Mar 26, 2024 · 0 comments
Open

[Bug] PortalViewCount bulk create fails #463

injoonH opened this issue Mar 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@injoonH
Copy link
Member

injoonH commented Mar 26, 2024

Describe the bug

ValueError: bulk_create() prohibited to prevent data loss due to unsaved related object 'article'.

It happens as bulk_create does not call save(). (Django: bulk_create)

The model’s save() method will not be called, and the pre_save and post_save signals will not be sent.

Expected behavior

PortalViewCount.objects.bulk_create() succeeds after Article.objects.bulk_create()

To Reproduce

python3 manage.py crawl_portal_manual --start="2024.03.25"
@injoonH injoonH added the bug Something isn't working label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant