diff --git a/chroma-manager/chroma_core/lib/service_config.py b/chroma-manager/chroma_core/lib/service_config.py index c8f1d8e6f2..c7e1d21ec2 100644 --- a/chroma-manager/chroma_core/lib/service_config.py +++ b/chroma-manager/chroma_core/lib/service_config.py @@ -547,7 +547,8 @@ def _setup_database(self, username, password, check_db_space): def clear_sessions(self): log.info("Clearing all sessions...") - Session.objects.all().delete() + if self._db_populated(): + Session.objects.all().delete() def set_nginx_config(self): project_dir = os.path.dirname(os.path.realpath(settings.__file__))