Skip to content

Commit

Permalink
fix: address feedback, sorted takes an iterable no need for list
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-sentry committed Nov 5, 2024
1 parent 3f0ed50 commit 0380ea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/test_results_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def create_daily_total():
# Upsert Tests
if len(test_data) > 0:
test_insert = insert(Test.__table__).values(
sorted(list(test_data.values()), key=lambda x: str(x["flags_hash"]))
sorted(test_data.values(), key=lambda x: str(x["flags_hash"]))
)
insert_on_conflict_do_update = test_insert.on_conflict_do_update(
index_elements=["repoid", "name", "testsuite", "flags_hash"],
Expand All @@ -364,7 +364,7 @@ def create_daily_total():
if len(daily_totals) > 0:
rollup_table = DailyTestRollup.__table__
stmt = insert(rollup_table).values(
sorted(list(daily_totals.values()), key=lambda x: str(x["test_id"]))
sorted(daily_totals.values(), key=lambda x: str(x["test_id"]))
)
stmt = stmt.on_conflict_do_update(
index_elements=[
Expand Down

0 comments on commit 0380ea5

Please sign in to comment.