Skip to content

Commit

Permalink
fix(sct/testrun): Check for duplicate entries on log submit
Browse files Browse the repository at this point in the history
  • Loading branch information
k0machi committed Dec 16, 2024
1 parent 420b826 commit 984c1ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions argus/backend/plugins/sct/testrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ def finish_run(self, payload: dict = None):

def submit_logs(self, logs: list[dict]):
for log in logs:
try:
next(existing for existing in self.logs if existing[0] == log["log_name"])
raise Exception(f"Log {log['log_name']} already exists!", log["log_name"])
except StopIteration:
pass
self.logs.append((log["log_name"], log["log_link"]))

def add_screenshot(self, screenshot_link: str):
Expand Down

0 comments on commit 984c1ae

Please sign in to comment.