Fix the check if the book is active
This commit is contained in:
parent
06a522231d
commit
836a71b2d0
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ func (db *pgDB) ActiveBook(id string) error {
|
|||
func (db *pgDB) IsBookActive(id string) bool {
|
||||
var active []bool
|
||||
err := db.sql.Model(&Book{}).
|
||||
Relation("active").
|
||||
Column("active").
|
||||
Where("id = ?", id).
|
||||
Select(&active)
|
||||
if err != nil || len(active) != 1 {
|
||||
|
|
Reference in a new issue