Spaces:
Sleeping
Sleeping
File size: 845 Bytes
e7ece9c 9ac95bc e7ece9c f8df45d e7ece9c 9ac95bc f8df45d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
class MapperParser:
@staticmethod
def parse_taskmapper_response(response):
"""Parses the response from the taskmapper and returns the task name."""
if not response or 'task' not in response:
return "No task identified"
task_info = response['task']
for task, is_selected in task_info.items():
if is_selected == "YES":
return task
@staticmethod
def parse_teammapper_response(response, default_team="DefaultTeam"):
"""Parses the response from the teammapper and returns the team name."""
if not response or 'Team' not in response:
return "ConsultingTeam"
team_info = response['Team']
for team, is_selected in team_info.items():
if is_selected:
return team
return "ConsultingTeam" |