forked from jason/cpolis
Fixed bug not showing correct issue in RSS feed
This commit is contained in:
@ -105,7 +105,7 @@ func (db *DB) GetArticle(id int64) (*Article, error) {
|
||||
|
||||
func (db *DB) GetCertainArticles(published, rejected bool) ([]*Article, error) {
|
||||
query := `
|
||||
SELECT id, title, created, description, content, author_id
|
||||
SELECT id, title, created, description, content, author_id, issue_id
|
||||
FROM articles
|
||||
WHERE published = ?
|
||||
AND rejected = ?
|
||||
@ -121,7 +121,8 @@ func (db *DB) GetCertainArticles(published, rejected bool) ([]*Article, error) {
|
||||
var created []byte
|
||||
|
||||
if err = rows.Scan(&article.ID, &article.Title, &created,
|
||||
&article.Description, &article.Content, &article.AuthorID); err != nil {
|
||||
&article.Description, &article.Content, &article.AuthorID,
|
||||
&article.IssueID); err != nil {
|
||||
return nil, fmt.Errorf("error scanning article row: %v", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user