Commit ·
9bc450b
1
Parent(s): e99a7b6
fix: 期間選択プルダウンでクラッシュする問題を修正
Browse files_assignments の値を2要素→4要素タプルに拡張した際に、
古い2要素アンパック (pos_v, is_reinf) / (pos_v, _) が2箇所残っていた。
ValueError: too many values to unpack が発生しクラッシュしていた。
- _render_monthly_tab: (pos_v, is_reinf) → (pos_v, is_reinf, *_)
- _render_slot_table count_map: (pos_v, _) → (pos_v, *_)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ui/schedule_view.py +2 -2
ui/schedule_view.py
CHANGED
|
@@ -346,7 +346,7 @@ class ScheduleView(QWidget):
|
|
| 346 |
e.id: {"bh": 0, "bk": 0, "dh": 0, "dk": 0, "reinf": 0}
|
| 347 |
for e in self._employees
|
| 348 |
}
|
| 349 |
-
for (emp_id, ds, slot_v), (pos_v, is_reinf) in self._assignments.items():
|
| 350 |
if emp_id not in counts:
|
| 351 |
continue
|
| 352 |
key = ("b" if slot_v == "breakfast" else "d") + ("h" if pos_v == "hall" else "k")
|
|
@@ -426,7 +426,7 @@ class ScheduleView(QWidget):
|
|
| 426 |
# 集計
|
| 427 |
count_map: dict[tuple[str, str], int] = defaultdict(int)
|
| 428 |
leader_map: dict[tuple[str, str], int] = defaultdict(int)
|
| 429 |
-
for (emp_id, ds, slot_v), (pos_v, _) in self._assignments.items():
|
| 430 |
if slot_v != slot.value:
|
| 431 |
continue
|
| 432 |
count_map[(ds, pos_v)] += 1
|
|
|
|
| 346 |
e.id: {"bh": 0, "bk": 0, "dh": 0, "dk": 0, "reinf": 0}
|
| 347 |
for e in self._employees
|
| 348 |
}
|
| 349 |
+
for (emp_id, ds, slot_v), (pos_v, is_reinf, *_) in self._assignments.items():
|
| 350 |
if emp_id not in counts:
|
| 351 |
continue
|
| 352 |
key = ("b" if slot_v == "breakfast" else "d") + ("h" if pos_v == "hall" else "k")
|
|
|
|
| 426 |
# 集計
|
| 427 |
count_map: dict[tuple[str, str], int] = defaultdict(int)
|
| 428 |
leader_map: dict[tuple[str, str], int] = defaultdict(int)
|
| 429 |
+
for (emp_id, ds, slot_v), (pos_v, *_) in self._assignments.items():
|
| 430 |
if slot_v != slot.value:
|
| 431 |
continue
|
| 432 |
count_map[(ds, pos_v)] += 1
|