scipious commited on
Commit
ac2208d
·
verified ·
1 Parent(s): 8db1cd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -578,12 +578,19 @@ def create_filter_by_type(regulation_type, regulation_title):
578
  }
579
 
580
  # 타입별 매핑
 
 
581
  type_mapping = {
 
 
 
 
 
582
  "part": "regulation_part",
583
- "section": "regulation_section",
584
  "chapter": "chapter_section",
585
- "jo": "jo"
586
  }
 
587
 
588
  filter_key = type_mapping.get(regulation_type, "regulation_part")
589
  filter_dict[filter_key].append(regulation_title)
 
578
  }
579
 
580
  # 타입별 매핑
581
+
582
+ # 전체 키를 지원하는 매핑 (입력으로 'regulation_section' 등을 받는 경우)
583
  type_mapping = {
584
+ "regulation_part": "regulation_part",
585
+ "regulation_section": "regulation_section",
586
+ "chapter_section": "chapter_section",
587
+ "jo": "jo",
588
+ # 혹시 짧은 형태로 들어오는 경우도 함께 지원
589
  "part": "regulation_part",
590
+ "section": "regulation_section",
591
  "chapter": "chapter_section",
 
592
  }
593
+
594
 
595
  filter_key = type_mapping.get(regulation_type, "regulation_part")
596
  filter_dict[filter_key].append(regulation_title)