chiark / gitweb /
Do not break if no trades found
[ypp-sc-tools.main.git] / yarrg / web / routetrade
index 4d8cd9f9ae8b77881616d907aa130b2f90ca19b2..074069d2b71b38a64d68897e9d5868f0b156dced 100644 (file)
@@ -239,6 +239,12 @@ $addcols->({ DoReverse => 1 },
 % }
 
 <%perl>
+
+if (!@flows) {
+       print 'No profitable trading opportunities were found.';
+       return;
+}
+
 foreach my $f (@flows) {
 
        $f->{MaxQty}= $f->{'org_qty_agg'} < $f->{'dst_qty_agg'}