lvsp_manager: fix bug when fetching regions

This commit is contained in:
Luna 2019-03-04 01:22:18 -03:00
parent 4a792966f1
commit 2d7dc05453
1 changed files with 3 additions and 1 deletions

View File

@ -40,12 +40,14 @@ class LVSPManager:
async def _spawn(self):
"""Spawn LVSPConnection for each region."""
regions = await self.app.db.fetchval("""
regions = await self.app.db.fetch("""
SELECT id
FROM voice_regions
WHERE deprecated = false
""")
regions = [r['id'] for r in regions]
if not regions:
log.warning('no regions are setup')
return