Skip to content

Commit

Permalink
fix: cast to string before concatenating
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Apr 18, 2023
1 parent e79f701 commit 3cf612b
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -6,7 +6,7 @@
from frappe import _
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from frappe.model.document import Document
from frappe.utils import add_to_date, cint, date_diff, get_datetime
from frappe.utils import add_to_date, cint, cstr, date_diff, get_datetime

from ecommerce_integrations.zenoti.purchase_transactions import process_purchase_orders
from ecommerce_integrations.zenoti.sales_transactions import process_sales_invoices
Expand All @@ -21,7 +21,7 @@ def validate(self):

url = api_url + "centers"
headers = {}
headers["Authorization"] = "apikey " + self.api_key
headers["Authorization"] = "apikey " + cstr(self.api_key)
response = requests.request("GET", url=url, headers=headers)
if response.status_code != 200:
frappe.throw("Please verify the API Key")
Expand Down

0 comments on commit 3cf612b

Please sign in to comment.