From 58ca1ba5a472b538e53da14341d40c07bc945c64 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 18 Mar 2019 11:28:13 -0700 Subject: [PATCH] models: Disable caching of supported_auth_backends for now. This seems to be causing hard-to-debug test failures. --- zerver/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zerver/models.py b/zerver/models.py index 1314dace21..da85881d60 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -141,8 +141,9 @@ def get_active_realm_emoji_cache_key(realm: 'Realm') -> str: supported_backends = None # type: Optional[Set[type]] def supported_auth_backends() -> Set[type]: global supported_backends - if supported_backends is None: - supported_backends = django.contrib.auth.get_backends() + # Caching temporarily disabled for debugging + supported_backends = django.contrib.auth.get_backends() + assert supported_backends is not None return supported_backends def clear_supported_auth_backends_cache() -> None: