Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Only clear sessions if db is populated (#795)
Browse files Browse the repository at this point in the history
Fixes Issue #794

Signed-off-by: Nathaniel Clark <[email protected]>
  • Loading branch information
utopiabound authored and jgrund committed Jan 30, 2019
1 parent b6867d8 commit bd7a6dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chroma-manager/chroma_core/lib/service_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__))
Expand Down

0 comments on commit bd7a6dd

Please sign in to comment.