From f9c31a1f44aeee9583fcb590207ffa3231255ffc Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 13 Apr 2015 20:13:20 -0700 Subject: [PATCH] Force market flag to 'Y' when we have items after import --- cache.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cache.py b/cache.py index 3a313e45..e7d0c841 100644 --- a/cache.py +++ b/cache.py @@ -867,6 +867,15 @@ def delta(self): """, buys) insertedBuys = buyCounter.delta + tdenv.DEBUG0("Marking populated stations as having a market") + db.execute( + "UPDATE Station SET market = 'Y'" + " WHERE EXISTS" + " (SELECT station_id FROM StationItem" + " WHERE StationItem.station_id = Station.station_id" + ")" + ) + db.commit() changes = " and ".join("{} {}".format(v, k) for k, v in {