From 2785a322a58d4f2b9a90a76ff66c85088dc16a47 Mon Sep 17 00:00:00 2001 From: Adam Sclafani <37944482+adamsclafani@users.noreply.github.com> Date: Wed, 12 May 2021 18:18:14 -1000 Subject: [PATCH] bug fix, changed LOKOLE_STSTATE_DIRECTORY to OPWEN (#545) --- opwen_email_client/webapp/forms/register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opwen_email_client/webapp/forms/register.py b/opwen_email_client/webapp/forms/register.py index a16942a5..5693922c 100644 --- a/opwen_email_client/webapp/forms/register.py +++ b/opwen_email_client/webapp/forms/register.py @@ -35,14 +35,14 @@ def _setup_client(self, path): response = post(client_create_url, json={'domain': client_domain}, headers={'Authorization': 'Bearer {}'.format(token)}) - if response.status != 200: + if response.status_code != 200: raise ValidationError(i8n.FAILED_REGISTRATION) register.delay(name, token, path) def _setup_path(self): home = Path.home() user = home.parts[-1] - path = (Path(getenv('LOKOLE_STATE_DIRECTORY', 'lokole/state')) / 'settings.env').absolute() + path = (Path(getenv('OPWEN_STATE_DIRECTORY', 'lokole/state')) / 'settings.env').absolute() parent = path.parent parent.mkdir(parents=True, exist_ok=True) is_in_home = parent.parts[:3] == home.parts