Refactor: 희망사항 시간대 무시, 투표소명 일치로만 템플릿 매칭

This commit is contained in:
user01
2026-05-25 00:36:55 +09:00
parent be4ff64137
commit 5846ad8a70

6
app.py
View File

@@ -842,7 +842,6 @@ def export():
dob_col = find_header_idx(headers, ['생년월일', '생일']) dob_col = find_header_idx(headers, ['생년월일', '생일'])
phone_col = find_header_idx(headers, ['연락처', '전화', '휴대폰']) phone_col = find_header_idx(headers, ['연락처', '전화', '휴대폰'])
addr_col = find_header_idx(headers, ['주소', '위치', '소재지']) addr_col = find_header_idx(headers, ['주소', '위치', '소재지'])
time_col = find_header_idx(headers, ['시간대'])
wp_name_col = find_header_idx(headers, ['투표소']) wp_name_col = find_header_idx(headers, ['투표소'])
if wp_name_col is None: if wp_name_col is None:
continue continue
@@ -854,11 +853,6 @@ def export():
current_wp = v current_wp = v
if not current_wp: if not current_wp:
continue continue
time_slot = str(row[time_col] or '').strip() if time_col is not None else ''
candidates = [w for w in wp_workers.get(current_wp, [])
if w['id'] not in used_names
and (not time_slot or time_slot in w.get('hope', ''))]
if not candidates and time_slot:
candidates = [w for w in wp_workers.get(current_wp, []) candidates = [w for w in wp_workers.get(current_wp, [])
if w['id'] not in used_names] if w['id'] not in used_names]
for w in candidates[:1]: for w in candidates[:1]: