From c3a01d435a7dc00450b59e96025723e5ed02227d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 13:50:30 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- simple_history/utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/simple_history/utils.py b/simple_history/utils.py index de4c98a61..382214e79 100644 --- a/simple_history/utils.py +++ b/simple_history/utils.py @@ -112,9 +112,11 @@ def bulk_create_with_history( obj_when_list.append(When(**attributes, then=i)) q = Q(**attributes) cumulative_filter = (cumulative_filter | q) if cumulative_filter else q - existing_objs_ids = list( - model_manager.filter(cumulative_filter).values_list("pk", flat=True) - ) if cumulative_filter else [] + existing_objs_ids = ( + list(model_manager.filter(cumulative_filter).values_list("pk", flat=True)) + if cumulative_filter + else [] + ) objs_with_id = model_manager.bulk_create( objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts )