|
14 | 14 | OpenDataContractStandard, |
15 | 15 | SchemaObject, |
16 | 16 | SchemaProperty, |
17 | | - Team, |
18 | 17 | ) |
19 | 18 | from openpyxl.cell.cell import Cell |
20 | 19 | from openpyxl.utils import range_boundaries |
@@ -629,24 +628,24 @@ def fill_support(export: Export): |
629 | 628 |
|
630 | 629 | def fill_team(export: Export): |
631 | 630 | team = export.odcs.team |
632 | | - members = team.members if isinstance(team, Team) else team |
633 | | - if isinstance(team, Team): |
634 | | - for name, value in ( |
635 | | - ("team.name", team.name), |
636 | | - ("team.description", team.description), |
637 | | - ("team.tags", ",".join(team.tags) if team.tags else None), |
638 | | - ("team.id", team.id), |
639 | | - ): |
640 | | - if value is not None and not set_optional_cell(export, name, value): |
641 | | - export.unsupported["team details"] += 1 |
642 | | - # the team block has no inline pairs: every custom property goes to the sheet |
643 | | - export.custom_property_rows += [(export.element(team), prop) for prop in team.customProperties or []] |
644 | | - export.sheet_authoritative_definitions(team) |
| 631 | + if team is None: |
| 632 | + return |
| 633 | + for name, value in ( |
| 634 | + ("team.name", team.name), |
| 635 | + ("team.description", team.description), |
| 636 | + ("team.tags", ",".join(team.tags) if team.tags else None), |
| 637 | + ("team.id", team.id), |
| 638 | + ): |
| 639 | + if value is not None and not set_optional_cell(export, name, value): |
| 640 | + export.unsupported["team details"] += 1 |
| 641 | + # the team block has no inline pairs: every custom property goes to the sheet |
| 642 | + export.custom_property_rows += [(export.element(team), prop) for prop in team.customProperties or []] |
| 643 | + export.sheet_authoritative_definitions(team) |
645 | 644 | found = row_sheet(export, "Team", "team") |
646 | 645 | if not found: |
647 | 646 | return |
648 | 647 | sheet, header_row = found |
649 | | - for offset, member in enumerate(members or []): |
| 648 | + for offset, member in enumerate(team.members or []): |
650 | 649 | values = { |
651 | 650 | "username": member.username, |
652 | 651 | "name": member.name, |
|
0 commit comments