diff --git a/toontown/building/DistributedBuildingMgrAI.py b/toontown/building/DistributedBuildingMgrAI.py index cda908a6..0d30bf29 100755 --- a/toontown/building/DistributedBuildingMgrAI.py +++ b/toontown/building/DistributedBuildingMgrAI.py @@ -197,7 +197,7 @@ class DistributedBuildingMgrAI: if not self.air.dbConn: simbase.backups.save('block-info', (self.air.districtId, self.branchId), backups) else: - street = {'ai': self.shard, 'branch': self.branchID} + street = {'district': self.air.districtId, 'branch': self.branchID} try: self.air.mongodb.toontown.blockinfo.update(street, {'$setOnInsert': street, '$set': {'buildings': backups}}, upsert=True) except AutoReconnect: @@ -208,8 +208,8 @@ class DistributedBuildingMgrAI: if not self.air.dbConn: blocks = simbase.backups.load('block-info', (self.air.districtId, self.branchId), default={}) return blocks - self.air.mongodb.toontown.blockinfo.ensure_index([('ai', 1), ('branch', 1)]) - street = {'ai': self.shard, 'branch': self.branchID} + self.air.mongodb.toontown.blockinfo.ensure_index([('district', 1), ('branch', 1)]) + street = {'district': self.air.districtId, 'branch': self.branchID} try: doc = self.air.mongodb.toontown.blockinfo.find_one(street) except AutoReconnect: diff --git a/toontown/racing/LeaderboardMgrAI.py b/toontown/racing/LeaderboardMgrAI.py index 8e1e4079..2be67847 100644 --- a/toontown/racing/LeaderboardMgrAI.py +++ b/toontown/racing/LeaderboardMgrAI.py @@ -11,9 +11,9 @@ class LeaderboardMgrAI: self.database = simbase.backups.load('leaderboard', (self.air.districtId,), default=({})) else: self.air.mongodb.toontown.leaderboard.ensure_index([('ai', 1)]) - street = {'ai': self.air.districtId} + district = {'ai': self.air.districtId} try: - doc = self.air.mongodb.toontown.leaderboard.find_one(street) + doc = self.air.mongodb.toontown.leaderboard.find_one(district) except AutoReconnect: return blocks