From 8a992f2ab1dde9f2f5a26f14f1477f8300e26917 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 26 Aug 2009 01:21:24 +0100 Subject: [PATCH] Do not break if no trades found --- yarrg/web/routetrade | 6 ++++++ 1 file changed, 6 insertions(+) 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'} -- 2.30.2