Commit 071b0650 authored by hrishikesh.r's avatar hrishikesh.r

Changes made to Oee_handlers.py

parent dad10484
...@@ -28,11 +28,12 @@ class Oee_Services: ...@@ -28,11 +28,12 @@ class Oee_Services:
return_json["status"] = "success" return_json["status"] = "success"
else: else:
logger.info("Unable to insert data in to Mongodb") logger.info("Unable to insert data in to Mongodb")
return return_json
except Exception as e: except Exception as e:
logger.exception("Error occurred while inserting data") logger.exception("Error occurred while inserting data")
return return_json
def get_oee_tag_mapping(self, get_oee_tag: get_oee_tag): def get_oee_tag_mapping(self, get_oee_tag: get_oee_tag):
try: try:
...@@ -50,9 +51,10 @@ class Oee_Services: ...@@ -50,9 +51,10 @@ class Oee_Services:
return_json["endOfrecords"] = False return_json["endOfrecords"] = False
else: else:
return_json["endOfrecords"] = True return_json["endOfrecords"] = True
return result
except Exception as e: except Exception as e:
logger.exception(f"Exception occured while fetching data as {e}") logger.exception(f"Exception occured while fetching data as {e}")
return result
def delete_oee_tags(self, project_id: project_id): def delete_oee_tags(self, project_id: project_id):
try: try:
...@@ -63,9 +65,10 @@ class Oee_Services: ...@@ -63,9 +65,10 @@ class Oee_Services:
return_json["message"] = "success" return_json["message"] = "success"
return_json["status"] = "success" return_json["status"] = "success"
return_json["data"] = result return_json["data"] = result
return result
except Exception as e: except Exception as e:
logger.exception(f"Exception occurred while fetching data as {e}") logger.exception(f"Exception occurred while fetching data as {e}")
return result
def update_oee_tags(self, update_oee_tags: update_oee_tags): def update_oee_tags(self, update_oee_tags: update_oee_tags):
try: try:
...@@ -76,6 +79,7 @@ class Oee_Services: ...@@ -76,6 +79,7 @@ class Oee_Services:
return_json["message"] = "success" return_json["message"] = "success"
return_json["status"] = "success" return_json["status"] = "success"
return_json["data"] = result return_json["data"] = result
return return_json
except Exception as e: except Exception as e:
logger.exception(f"Exception occured while fetching data as {e}") logger.exception(f"Exception occured while fetching data as {e}")
return return_json
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