mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Subsequent commits will add "on_delete=models.RESTRICT" relationships, which will result in the AlertWord objects being deleted after Realm has been deleted from the database. In order to handle this, we update realm_alert_words_cache_key, realm_alert_words_automaton_cache_key, and flush_realm_alert_words functions to accept realm_id as parameter instead of realm object, so that the code for flushing the cache works even after the realm is deleted. This change is fine because eventually only realm_id is used by these functions and there is no need of the complete realm object.
182 KiB
182 KiB