chiark / gitweb /
Do not break if no trades found
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 26 Aug 2009 00:21:24 +0000 (01:21 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 26 Aug 2009 00:21:24 +0000 (01:21 +0100)
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'}