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): async def _spawn(self):
"""Spawn LVSPConnection for each region.""" """Spawn LVSPConnection for each region."""
regions = await self.app.db.fetchval(""" regions = await self.app.db.fetch("""
SELECT id SELECT id
FROM voice_regions FROM voice_regions
WHERE deprecated = false WHERE deprecated = false
""") """)
regions = [r['id'] for r in regions]
if not regions: if not regions:
log.warning('no regions are setup') log.warning('no regions are setup')
return return