From: Ian Jackson Date: Wed, 26 Aug 2009 00:21:24 +0000 (+0100) Subject: Do not break if no trades found X-Git-Tag: 3.4~96 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=commitdiff_plain;h=8a992f2ab1dde9f2f5a26f14f1477f8300e26917 Do not break if no trades found --- diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index 4d8cd9f..074069d 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -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'}