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 4d8cd9f..074069d 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'}