Skip to content

Commit c3a01d4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent bc87a57 commit c3a01d4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

simple_history/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ def bulk_create_with_history(
112112
obj_when_list.append(When(**attributes, then=i))
113113
q = Q(**attributes)
114114
cumulative_filter = (cumulative_filter | q) if cumulative_filter else q
115-
existing_objs_ids = list(
116-
model_manager.filter(cumulative_filter).values_list("pk", flat=True)
117-
) if cumulative_filter else []
115+
existing_objs_ids = (
116+
list(model_manager.filter(cumulative_filter).values_list("pk", flat=True))
117+
if cumulative_filter
118+
else []
119+
)
118120
objs_with_id = model_manager.bulk_create(
119121
objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts
120122
)

0 commit comments

Comments
 (0)