diff --git a/aitrainer_backoffice/aitrainer_backoffice/settings/prod.py b/aitrainer_backoffice/aitrainer_backoffice/settings/prod.py index 35be5e4..aa024e3 100644 --- a/aitrainer_backoffice/aitrainer_backoffice/settings/prod.py +++ b/aitrainer_backoffice/aitrainer_backoffice/settings/prod.py @@ -28,7 +28,7 @@ SECRET_KEY = '9874959872==9847588jkklnkln$asdf' #os.environ['DJANGO_KEY'] # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['62.171.188.119', 'localhost', 'andio.eu', 'aitrainer.info','aitrainer.app'] +ALLOWED_HOSTS = ['62.171.188.119', 'localhost', 'andio.eu', 'aitrainer.info','aitrainer.app', 'admin.aitrainer.info'] # Application definition @@ -89,10 +89,18 @@ DATABASES = { 'PASSWORD': 'andio2009', 'HOST': '62.171.188.119', 'PORT': 33060 + }, + 'live': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'aitrainer', + 'USER': 'aitrainer', + 'PASSWORD': 'andio2009', + 'HOST': '62.171.188.119', + 'PORT': 33060 } } -DATABASE_ROUTERS = ['aitrainer_backoffice.db_router.TestRouter'] +DATABASE_ROUTERS = ['aitrainer_backoffice.aitrainer_backoffice.db_router.TestRouter'] # Password validation # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators diff --git a/aitrainer_backoffice/controlling/mautic/helper.py b/aitrainer_backoffice/controlling/mautic/helper.py index 4230ec0..b0f1277 100644 --- a/aitrainer_backoffice/controlling/mautic/helper.py +++ b/aitrainer_backoffice/controlling/mautic/helper.py @@ -16,7 +16,7 @@ class MauticHelper: if len(last_synced_date) != 0: qs = Customer.objects.raw( - 'SELECT * from customer WHERE date_add > "' + last_synced_date + '" and synced_date is null') + 'SELECT * from customer WHERE date_add > "' + last_synced_date + '" or synced_date is null') else: qs = Customer.objects.raw( 'SELECT * from customer WHERE synced_date is null')