Skip to content

Commit 7d64aa9

Browse files
committed
fixed test script
1 parent e9e3d3d commit 7d64aa9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

autogpt_platform/backend/backend/util/test_data_creator.py renamed to autogpt_platform/backend/test/test_data_creator.py

File renamed without changes.

autogpt_platform/backend/backend/test_data_updater.py renamed to autogpt_platform/backend/test/test_data_updater.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,13 @@ async def main():
300300
print(f" - Agent {row['agentGraphId'][:8]}...: {row['run_count']} runs")
301301

302302
sample_reviews = await db.query_raw(
303-
"SELECT * FROM mv_review_stats ORDER BY avg_rating DESC LIMIT 5"
303+
"SELECT * FROM mv_review_stats ORDER BY avg_rating DESC NULLS LAST LIMIT 5"
304304
)
305305
print("\nTop 5 store listings by rating:")
306306
for row in sample_reviews:
307+
avg_rating = row['avg_rating'] if row['avg_rating'] is not None else 0.0
307308
print(
308-
f" - Listing {row['storeListingId'][:8]}...: {row['avg_rating']:.2f} ⭐ ({row['review_count']} reviews)"
309+
f" - Listing {row['storeListingId'][:8]}...: {avg_rating:.2f} ⭐ ({row['review_count']} reviews)"
309310
)
310311

311312
await db.disconnect()

0 commit comments

Comments
 (0)