We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0c4425e + d6fc801 commit a1798b0Copy full SHA for a1798b0
.changelog/947.bugfix.md
@@ -0,0 +1 @@
1
+api/rofl_apps: Fix query when app has no instances
storage/client/queries/queries.go
@@ -980,9 +980,10 @@ const (
980
latest_blk.timestamp AS last_activity,
981
latest_tx.tx_round AS last_activity_tx_round,
982
latest_tx.tx_index AS last_activity_tx_index,
983
- ri_agg.num_active_instances,
+ COALESCE(ri_agg.num_active_instances, 0) as num_active_instances,
984
COALESCE(
985
- jsonb_agg(ri_agg.instance_json ORDER BY ri_agg.expiration_epoch DESC),
+ jsonb_agg(ri_agg.instance_json ORDER BY ri_agg.expiration_epoch DESC)
986
+ FILTER (WHERE ri_agg.instance_json IS NOT NULL),
987
'[]'::jsonb
988
) AS active_instances
989
FROM chain.rofl_apps AS ra
0 commit comments