Skip to content

Commit

Permalink
Force market flag to 'Y' when we have items after import
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Apr 14, 2015
1 parent 08fc775 commit f9c31a1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f9c31a1

Please sign in to comment.