Merge branch 'master' into features/ttn

This commit is contained in:
John 2015-07-18 02:42:40 +03:00
commit ba8df1addf

View file

@ -143,7 +143,7 @@ class AccountDB:
def addNameRequest(self, avId, name, accountID = None): def addNameRequest(self, avId, name, accountID = None):
return True return True
def getNameStatus(self, avId, callback = None): def getNameStatus(self, accountId, callback = None):
return 'APPROVED' return 'APPROVED'
def removeNameRequest(self, avId): def removeNameRequest(self, avId):
@ -617,10 +617,13 @@ class GetAvatarsFSM(AvatarOperationFSM):
if wishNameState == 'OPEN': if wishNameState == 'OPEN':
nameState = 1 nameState = 1
elif wishNameState == 'PENDING': elif wishNameState == 'PENDING':
if self.nameStateData is None: if accountDBType == 'remote':
self.demand('QueryNameState') if self.nameStateData is None:
return self.demand('QueryNameState')
actualNameState = self.nameStateData[str(avId)] return
actualNameState = self.nameStateData[str(avId)]
else:
actualNameState = self.csm.accountDB.getNameStatus(self.account['ACCOUNT_ID'])
self.csm.air.dbInterface.updateObject( self.csm.air.dbInterface.updateObject(
self.csm.air.dbId, self.csm.air.dbId,
avId, avId,