summaryrefslogtreecommitdiffstats
path: root/models/action.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/action.go')
-rw-r--r--models/action.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/models/action.go b/models/action.go
index 5333f62772..b551d79bb8 100644
--- a/models/action.go
+++ b/models/action.go
@@ -742,5 +742,14 @@ func GetFeeds(opts GetFeedsOptions) ([]*Action, error) {
}
actions := make([]*Action, 0, 20)
- return actions, x.Limit(20).Desc("id").Where(cond).Find(&actions)
+
+ if err := x.Limit(20).Desc("id").Where(cond).Find(&actions); err != nil {
+ return nil, fmt.Errorf("Find: %v", err)
+ }
+
+ if err := ActionList(actions).LoadAttributes(); err != nil {
+ return nil, fmt.Errorf("LoadAttributes: %v", err)
+ }
+
+ return actions, nil
}