new-ara-api
new-ara-api copied to clipboard
[Bug] PortalViewCount bulk create fails
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"