From a4ac6059a29470e5911541215194b8d16f4e814b Mon Sep 17 00:00:00 2001 From: Robert Lin Date: Fri, 25 Sep 2020 09:36:29 +0800 Subject: [PATCH] model: add folder to team from/to dict --- app/model/team.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/model/team.py b/app/model/team.py index 41488dcc..133cc068 100644 --- a/app/model/team.py +++ b/app/model/team.py @@ -68,6 +68,7 @@ def from_dict(cls: Type[T], d: Dict[str, Any]) -> T: d['github_team_name'], d.get('display_name', '')) team.platform = d.get('platform', '') + team.folder = d.get('folder', '') team.team_leads = set(d.get('team_leads', [])) members = set(d.get('members', [])) for member in members: @@ -98,6 +99,7 @@ def place_if_filled(name: str, field: Any): place_if_filled('platform', team.platform) place_if_filled('members', team.members) place_if_filled('team_leads', team.team_leads) + place_if_filled('folder', team.folder) return tdict