File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
autogpt_platform/backend/test Expand file tree Collapse file tree 2 files changed +3
-2
lines changed File renamed without changes.
Original file line number Diff line number Diff 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 ("\n Top 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 ()
You can’t perform that action at this time.
0 commit comments