David Taylor 964f37476d
FIX: TopicQuery for NULL category.topic_id (#20664)
Our schema allows `category.topic_id` to be NULL. Null values shouldn't actually happen in production, but it is very common in tests because `Fabricate(:category)` skips creating the definition topic to improve performance. Before this commit, a NULL category.topic_id would cause all subcategory topics to be excluded from a TopicQuery result. This is because, in postgres, `NULL <> anything` is falsy. Instead, we can use `IS DISTINCT FROM`, which will return true when NULL is compared to a non-NULL value.
2023-03-13 19:33:26 +00:00
..
2022-04-28 11:51:03 +02:00
2023-02-21 10:30:48 +01:00
2023-02-21 10:30:48 +01:00
2023-02-21 10:30:48 +01:00
2023-02-21 10:30:48 +01:00
2023-02-21 10:30:48 +01:00
2023-02-21 10:30:48 +01:00
2023-02-21 10:30:48 +01:00
2023-02-21 10:30:48 +01:00
2020-07-21 15:55:03 +08:00