Skip to content

Commit a082bce

Browse files
committed
Create MediaDecisionThrough objects using identifier rather than instance
1 parent 619eb7b commit a082bce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/api/management/commands/backfillmoderationdecision.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ def handle(self, *args, **options):
9494
MediaReport.objects.bulk_update(reports_chunk, ["decision"])
9595
MediaDecisionThrough.objects.bulk_create(
9696
[
97-
MediaDecisionThrough(media_obj=report.media_obj, decision=decision)
97+
MediaDecisionThrough(
98+
media_obj_id=report.media_obj_id, decision=decision
99+
)
98100
for report, decision in zip(reports_chunk, decisions)
99101
]
100102
)

0 commit comments

Comments
 (0)