summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-02-16 15:13:53 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-02-16 15:13:53 +0700
commitdc44e019784e18f34bb84a86640793efd3daca17 (patch)
tree2e4fba233e7762e1d8e2f780ef63adfdb175e6ae
parentaeb50c4ede78b7f101c5ccf7a63a2fb81ec3aae0 (diff)
bug fix wati
-rw-r--r--indoteknik_api/controllers/api_v1/wati.py3
-rw-r--r--indoteknik_custom/models/wati.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_api/controllers/api_v1/wati.py b/indoteknik_api/controllers/api_v1/wati.py
index 01b32653..68ff1640 100644
--- a/indoteknik_api/controllers/api_v1/wati.py
+++ b/indoteknik_api/controllers/api_v1/wati.py
@@ -13,7 +13,8 @@ class Wati(controller.Controller):
json_dump = json.dumps(json_raw, indent=4, sort_keys=True)
request.env['wati.notification'].create([{
- 'json_raw': json_dump
+ 'json_raw': json_dump,
+ 'is_lead': False
}])
return
diff --git a/indoteknik_custom/models/wati.py b/indoteknik_custom/models/wati.py
index 0a4da9e1..37c97f59 100644
--- a/indoteknik_custom/models/wati.py
+++ b/indoteknik_custom/models/wati.py
@@ -28,7 +28,7 @@ class WatiNotification(models.Model):
if current_lead:
# must append internal notes as a reply here
- current_lead.description = current_lead.description + "|" +str(text)
+ current_lead.description = str(current_lead.description) + "|" +str(text)
wati.is_lead = True
else:
# create new leads