BO 1.34+4 trial sync
This commit is contained in:
@@ -29,7 +29,7 @@ class Mautic:
|
||||
"&mauticform[database_id]=" + str(customer.customer_id) + \
|
||||
"&mauticform[lang]=" + str(customer.lang) + \
|
||||
"&mauticform[formId]=7" + \
|
||||
"&mauticform[formName]=appdatachange"
|
||||
"&mauticform[formName]=appdatasync"
|
||||
|
||||
print(data)
|
||||
|
||||
@@ -49,7 +49,7 @@ class Mautic:
|
||||
return True
|
||||
|
||||
def syncTrial(self):
|
||||
qs = Customer.objects.raw('SELECT * from customer WHERE trial_date is not null and trial_date != "1900-01-01 00:00:00 00:00" and trial_date_sync is null')
|
||||
qs = Customer.objects.raw('select * FROM customer WHERE trial_date <= NOW() - INTERVAL 10 DAY and trial_date_sync is null')
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.info("Syncronising trial date...")
|
||||
|
||||
@@ -61,9 +61,9 @@ class Mautic:
|
||||
for customer in qs:
|
||||
data = "mauticform[email]=" + customer.email + \
|
||||
"&mauticform[database_id]=" + str(customer.customer_id) + \
|
||||
"&mauticform[trialdate]=" + str(customer.trial_date) + \
|
||||
"&mauticform[trialdate]=1900-01-01" + \
|
||||
"&mauticform[formId]=7" + \
|
||||
"&mauticform[formName]=appdatachange"
|
||||
"&mauticform[formName]=appdatasync"
|
||||
|
||||
print(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user