Skip to content

Commit

Permalink
fix: avoid clobbering rebuttals
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Jan 8, 2024
1 parent eb5d179 commit c72866a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fediseer/apis/v1/censures.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ def get(self, domain):
if len(censures_filtered) > 0:
c_instance_details["censure_reasons"] = [censure.reason for censure in censures_filtered]
c_instance_details["censure_evidence"] = [censure.evidence for censure in censures_filtered if censure.evidence is not None]
rebuttals = [r.rebuttal for r in rebuttals if r.target_id == c_instance.id]
if len(rebuttals) > 0 and not database.instance_has_flag(c_instance.id,enums.InstanceFlags.MUTED):
c_instance_details["rebuttal"] = rebuttals
rebuttals_texts = [r.rebuttal for r in rebuttals if r.target_id == c_instance.id]
if len(rebuttals_texts) > 0 and not database.instance_has_flag(c_instance.id,enums.InstanceFlags.MUTED):
c_instance_details["rebuttal"] = rebuttals_texts
instance_details.append(c_instance_details)
if self.args.csv:
return {
Expand Down

0 comments on commit c72866a

Please sign in to comment.