remove unneccessary imports
diff --git a/erpnext/www/book-appointment/index.py b/erpnext/www/book-appointment/index.py
index fe30ef6..213617f 100644
--- a/erpnext/www/book-appointment/index.py
+++ b/erpnext/www/book-appointment/index.py
@@ -30,7 +30,6 @@
@frappe.whitelist(allow_guest=True)
def get_appointment_slots(date, timezone):
- import pytz
# Convert query to local timezones
format_string = '%Y-%m-%d %H:%M:%S'
query_start_time = datetime.datetime.strptime(
@@ -92,7 +91,6 @@
@frappe.whitelist(allow_guest=True)
def create_appointment(date, time, tz, contact):
- import pytz
appointment = frappe.new_doc('Appointment')
format_string = '%Y-%m-%d %H:%M:%S%z'
scheduled_time = datetime.datetime.strptime(
@@ -119,7 +117,6 @@
return filtered_timeslots
def convert_to_guest_timezone(guest_tz,datetimeobject):
- import pytz
guest_tz = pytz.timezone(guest_tz)
local_timezone = pytz.timezone(frappe.utils.get_time_zone())
datetimeobject = local_timezone.localize(datetimeobject)
@@ -127,7 +124,6 @@
return datetimeobject
def convert_to_system_timezone(guest_tz,datetimeobject):
- import pytz
guest_tz = pytz.timezone(guest_tz)
datetimeobject = guest_tz.localize(datetimeobject)
system_tz = pytz.timezone(frappe.utils.get_time_zone())