diff --git a/server/szurubooru/search/configs/post_search_config.py b/server/szurubooru/search/configs/post_search_config.py index 2cd381c..1039cf6 100644 --- a/server/szurubooru/search/configs/post_search_config.py +++ b/server/szurubooru/search/configs/post_search_config.py @@ -167,7 +167,7 @@ class PostSearchConfig(BaseSearchConfig): ('last-edit-date', 'last-edit-time', 'edit-date', 'edit-time'): search_util.create_date_filter(db.Post.last_edit_time), ('comment-date', 'comment-time'): - search_util.create_date_filter(db.Post.last_comment_edit_time), + search_util.create_date_filter(db.Post.last_comment_creation_time), ('fav-date', 'fav-time'): search_util.create_date_filter(db.Post.last_favorite_time), ('feature-date', 'feature-time'): @@ -196,7 +196,7 @@ class PostSearchConfig(BaseSearchConfig): ('last-edit-date', 'last-edit-time', 'edit-date', 'edit-time'): (db.Post.last_edit_time, self.SORT_DESC), ('comment-date', 'comment-time'): - (db.Post.last_comment_edit_time, self.SORT_DESC), + (db.Post.last_comment_creation_time, self.SORT_DESC), ('fav-date', 'fav-time'): (db.Post.last_favorite_time, self.SORT_DESC), ('feature-date', 'feature-time'): diff --git a/server/szurubooru/tests/search/configs/test_post_search_config.py b/server/szurubooru/tests/search/configs/test_post_search_config.py index 035e770..55b24a8 100644 --- a/server/szurubooru/tests/search/configs/test_post_search_config.py +++ b/server/szurubooru/tests/search/configs/test_post_search_config.py @@ -420,9 +420,9 @@ def test_filter_by_comment_date( comment1 = comment_factory(post=post1) comment2 = comment_factory(post=post2) comment3 = comment_factory(post=post3) - comment1.last_edit_time = datetime.datetime(2014, 1, 1) - comment2.last_edit_time = datetime.datetime(2015, 1, 1) - comment3.last_edit_time = datetime.datetime(2016, 1, 1) + comment1.creation_time = datetime.datetime(2014, 1, 1) + comment2.creation_time = datetime.datetime(2015, 1, 1) + comment3.creation_time = datetime.datetime(2016, 1, 1) db.session.add_all([post1, post2, post3, comment1, comment2, comment3]) verify_unpaged(input, expected_post_ids)