mirror of
https://github.com/sigmasternchen/threadule
synced 2025-03-15 08:09:01 +00:00
fix: only list thread that are not sent yet
This commit is contained in:
parent
06042d017c
commit
48cd194d04
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,9 @@ func (d *Data) GetAccountsByUser(user *models.User) ([]models.Account, error) {
|
|||
var accounts []models.Account
|
||||
err := d.db.
|
||||
Preload("Threads", func(db *gorm.DB) *gorm.DB {
|
||||
return db.Order("scheduled_for ASC")
|
||||
return db.
|
||||
Where("status != ?", models.ThreadDone).
|
||||
Order("scheduled_for ASC")
|
||||
}).
|
||||
Preload("Threads.Tweets", func(db *gorm.DB) *gorm.DB {
|
||||
return db.Order("ordinal ASC")
|
||||
|
|
Loading…
Reference in a new issue