﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31384	Check if objs are clean before bulk_create, bulk_update	GardenLee	nobody	"We have to check validation of objects set that you want to insert when trying bulk_create

I suggest Users can do any tasks (ex. model fields validation) through the parameters like {{{clean_check=True}}} when they use bulk_create and bulk_update method

I suggest that through the parameters bulk_create, bulk_update method, and clean_check, when the user wants, the clean function on the object set can be executed so that the user can perform the desired operation
By implementing this way, users can insert objects only passed by {{{clean()}}} method that return boolean type
{{{
    def bulk_create(self, objs, clean_check=None, batch_size=None, ignore_conflicts=False):
        ~~~
        if clean_check:
            objs = [obj for obj in objs if obj.clean()]
        ~~~
}}}

By implementing this way, validation errors in clean can prevent the insertion of object sets containing invalid objects.
{{{
    def bulk_create(self, objs, clean_check=None, batch_size=None, ignore_conflicts=False):
        ~~~
        for obj in objs:
            obj.clean()
        ~~~
}}}"	New feature	new	Database layer (models, ORM)	3.0	Normal				Unreviewed	0	0	0	0	0	0
