diff options
| author | 2025-03-03 23:05:39 +0100 | |
|---|---|---|
| committer | 2025-03-03 23:05:39 +0100 | |
| commit | 03aec8b54e03a767282f6c886113df35bac9cf00 (patch) | |
| tree | 20b4beae079bfcc5627416367e701b7b3deebd11 /app/Models | |
| parent | 78ca659eccc5973282194881a5d2be4edd365440 (diff) | |
Fix dynamic OPML (#7394)
Regression from https://github.com/FreshRSS/FreshRSS/pull/7155
Fix https://github.com/FreshRSS/FreshRSS/issues/7385
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Category.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/Models/Category.php b/app/Models/Category.php index 221e8644d..e883a99cf 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -162,11 +162,14 @@ class FreshRSS_Category extends Minz_Model { if ($this->feeds === null) { $this->feeds = []; } - if ($feed->id() !== 0) { - $feed->_category($this); + $feed->_category($this); + if ($feed->id() === 0) { + // Feeds created on a dry run do not have an ID + $this->feeds[] = $feed; + } else { $this->feeds[$feed->id()] = $feed; - $this->sortFeeds(); } + $this->sortFeeds(); } /** |
