Skip to content

Commit

Permalink
Fix bulk create without objects
Browse files Browse the repository at this point in the history
  • Loading branch information
WestonChan committed Sep 19, 2022
1 parent 419f270 commit bc87a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple_history/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def bulk_create_with_history(
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 []
objs_with_id = model_manager.bulk_create(
objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts
)
Expand Down

0 comments on commit bc87a57

Please sign in to comment.