Skip to content

Commit bc87a57

Browse files
committed
Fix bulk create without objects
1 parent 419f270 commit bc87a57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simple_history/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def bulk_create_with_history(
114114
cumulative_filter = (cumulative_filter | q) if cumulative_filter else q
115115
existing_objs_ids = list(
116116
model_manager.filter(cumulative_filter).values_list("pk", flat=True)
117-
)
117+
) if cumulative_filter else []
118118
objs_with_id = model_manager.bulk_create(
119119
objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts
120120
)

0 commit comments

Comments
 (0)