From 57c6a9732813cb7f5daa8948fd659e2c24f341bc Mon Sep 17 00:00:00 2001 From: dgw Date: Thu, 14 Jul 2016 14:31:33 -0500 Subject: [PATCH] [db] Fix group nick count check in unalias_nick() Resolves #1101 --- sopel/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sopel/db.py b/sopel/db.py index 0608b4ec40..2b02220773 100644 --- a/sopel/db.py +++ b/sopel/db.py @@ -174,7 +174,7 @@ def unalias_nick(self, alias): nick_id = self.get_nick_id(alias, False) count = self.execute('SELECT COUNT(*) FROM nicknames WHERE nick_id = ?', [nick_id]).fetchone()[0] - if count == 0: + if count <= 1: raise ValueError('Given alias is the only entry in its group.') self.execute('DELETE FROM nicknames WHERE slug = ?', [alias.lower()])