Fix review items (#12126)

This commit is contained in:
Nicolas Mowen 2024-06-23 17:52:02 -06:00 committed by GitHub
parent abc1ecfb60
commit 88046ebd15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -221,14 +221,13 @@ class ReviewSegmentMaintainer(threading.Thread):
"""End segment.""" """End segment."""
final_data = segment.get_data(ended=True) final_data = segment.get_data(ended=True)
self.requestor.send_data(UPSERT_REVIEW_SEGMENT, final_data) self.requestor.send_data(UPSERT_REVIEW_SEGMENT, final_data)
end_data = {k.name: v for k, v in final_data.items()}
self.requestor.send_data( self.requestor.send_data(
"reviews", "reviews",
json.dumps( json.dumps(
{ {
"type": "end", "type": "end",
"before": prev_data, "before": {k.name: v for k, v in prev_data.items()},
"after": end_data, "after": {k.name: v for k, v in final_data.items()},
} }
), ),
) )