1
0
Fork 0

Fix broken OPML import with Go 1.10

This commit is contained in:
Frédéric Guillot 2018-03-14 18:50:06 -07:00
parent dd68181a83
commit ec08f45bf5

View file

@ -41,7 +41,7 @@ func (h *Handler) Export(userID int64) (string, error) {
}
// Import parses and create feeds from an OPML import.
func (h *Handler) Import(userID int64, data io.Reader) (err error) {
func (h *Handler) Import(userID int64, data io.Reader) error {
subscriptions, err := Parse(data)
if err != nil {
return err
@ -50,6 +50,7 @@ func (h *Handler) Import(userID int64, data io.Reader) (err error) {
for _, subscription := range subscriptions {
if !h.store.FeedURLExists(userID, subscription.FeedURL) {
var category *model.Category
var err error
if subscription.CategoryName == "" {
category, err = h.store.FirstCategory(userID)