diff --git a/boards/models/post/__init__.py b/boards/models/post/__init__.py --- a/boards/models/post/__init__.py +++ b/boards/models/post/__init__.py @@ -152,13 +152,6 @@ class Post(models.Model, Viewable): def get_thread_id(self): return self.thread_id - def get_threads(self) -> QuerySet: - """ - Gets post's thread. - """ - - return self.threads - def _get_cache_key(self): return [datetime_to_epoch(self.last_edit_time)] diff --git a/boards/models/thread.py b/boards/models/thread.py --- a/boards/models/thread.py +++ b/boards/models/thread.py @@ -238,14 +238,12 @@ class Thread(models.Model): def update_posts_time(self, exclude_posts=None): last_edit_time = self.last_edit_time - for post in self.multi_replies.all(): + for post in self.replies.all(): if exclude_posts is None or post not in exclude_posts: # Manual update is required because uids are generated on save post.last_edit_time = last_edit_time post.save(update_fields=['last_edit_time']) - post.get_threads().update(last_edit_time=last_edit_time) - def notify_clients(self): if not settings.get_bool('External', 'WebsocketsEnabled'): return