mirror of
https://github.com/flarum/core.git
synced 2025-08-01 06:00:24 +02:00
Only get posts with registered types.
This is so that if an extension adds a post type, and the database gets populated with posts of that type, but then if the extension is disabled, we wouldn’t want those posts to display because we would have no knowledge about how to deal with/render them.
This commit is contained in:
@@ -68,7 +68,7 @@ class Discussion extends Model
|
||||
static::deleted(function ($discussion) {
|
||||
$discussion->raise(new DiscussionWasDeleted($discussion));
|
||||
|
||||
$discussion->posts()->delete();
|
||||
$discussion->posts()->allTypes()->delete();
|
||||
$discussion->readers()->detach();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user