Skip to content

Commit

Permalink
fix: group (#28)
Browse files Browse the repository at this point in the history
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
  • Loading branch information
Dup4 authored May 19, 2024
1 parent 86431b3 commit a7f120f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions xcpcio_board_spider/type/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ def get_dict(self):
if self.coach is not None:
obj["coach"] = self.coach

if self.official is not None:
obj[constants.TEAM_TYPE_OFFICIAL] = self.official
if self.unofficial is not None:
obj[constants.TEAM_TYPE_UNOFFICIAL] = self.unofficial
if self.girl is not None:
obj[constants.TEAM_TYPE_GIRL] = self.girl
if self.official is not None and self.official is True:
self.group.append(constants.TEAM_TYPE_OFFICIAL)
if self.unofficial is not None and self.unofficial is True:
self.group.append(constants.TEAM_TYPE_UNOFFICIAL)
if self.girl is not None and self.girl is True:
self.group.append(constants.TEAM_TYPE_GIRL)

if self.location is not None:
obj["location"] = self.location

obj["group"] = self.group
obj["group"] = list(set(self.group))

return obj

Expand Down

0 comments on commit a7f120f

Please sign in to comment.