fix
This commit is contained in:
parent
723fa5aff5
commit
22dc099105
@ -754,6 +754,9 @@ func (self *PostgresDatabase) UnbanNewsgroup(group string) (err error) {
|
|||||||
func (self *PostgresDatabase) NewsgroupBanned(group string) (banned bool, err error) {
|
func (self *PostgresDatabase) NewsgroupBanned(group string) (banned bool, err error) {
|
||||||
var count int64
|
var count int64
|
||||||
err = self.conn.QueryRow(self.stmt[NewsgroupBanned], group).Scan(&count)
|
err = self.conn.QueryRow(self.stmt[NewsgroupBanned], group).Scan(&count)
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
banned = count > 0
|
banned = count > 0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user