Commit 65322bc7 authored by hemanthkumar.pasham's avatar hemanthkumar.pasham

Adding project to tz function

parent c4e18dcf
...@@ -85,10 +85,13 @@ class Oee_Services: ...@@ -85,10 +85,13 @@ class Oee_Services:
raise raise
def get_project_tz(self): def get_project_tz(self):
connection = self.mongo_connect try:
project_tz = connection.find() connection = self.mongo_connect
return_json = {} project_tz = connection.find()
for each_project in project_tz: return_json = {}
for each_tz in each_project: for each_project in project_tz:
return_json.update({str(each_tz.get("customer_project_name")): str(each_tz.get("timezone"))}) for each_tz in each_project:
return return_json return_json.update({str(each_tz.get("customer_project_name")): str(each_tz.get("timezone"))})
return return_json
except Exception as e:
logger.info("Exception occured while fetching project timezone")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment