diff --git a/zerver/management/commands/export_search.py b/zerver/management/commands/export_search.py index 4904e49c4f..edaa45c1db 100644 --- a/zerver/management/commands/export_search.py +++ b/zerver/management/commands/export_search.py @@ -86,6 +86,7 @@ This is most often used for legal compliance. ) realm = self.get_realm(options) + assert realm is not None limits = Q() limits = reduce(