Conversation
* fix: update menu deletion logic to exclude festival restaurant IDs * lint * fix: update menu deletion logic to exclude festival restaurant IDs * lint
There was a problem hiding this comment.
Pull Request Overview
This pull request implements temporary logic to exclude festival restaurant menus (IDs 250-264) from deletion during the crawling process. This appears to be a festival-specific deployment for September 16, 2025.
- Added filtering logic to prevent deletion of menus from festival restaurants with IDs 250-264
- Modified the compare_menus function to use filtered deletion list instead of original deletion list
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ############ | ||
| # FIXME: 추후 삭제: 축제 음식점(250~264) 메뉴는 삭제 대상에서 제외 | ||
| db_not_found_filtered = [] | ||
| for idx, not_found in enumerate(db_not_found): | ||
| if not_found: | ||
| restaurant_id = db_menus[idx].get("restaurant_id") | ||
| if 250 <= restaurant_id <= 264: | ||
| db_not_found_filtered.append(False) # 삭제하지 않음 | ||
| else: | ||
| db_not_found_filtered.append(True) # 삭제 대상 | ||
| else: | ||
| db_not_found_filtered.append(False) | ||
| ###### |
There was a problem hiding this comment.
[nitpick] The hardcoded restaurant ID range (250-264) should be extracted to a configuration constant or environment variable to improve maintainability and make it easier to update without code changes.
| return ( | ||
| list(compress(crawled_menus, crawled_not_found)), | ||
| list(compress(db_menus, db_not_found)), | ||
| list(compress(db_menus, db_not_found_filtered)), # FIXME: 축제 음식점(250~264) 메뉴는 삭제 대상에서 제외 |
There was a problem hiding this comment.
[nitpick] The inline comment should be in English to maintain consistency with the rest of the codebase, or follow the project's established language standards for documentation.
| list(compress(db_menus, db_not_found_filtered)), # FIXME: 축제 음식점(250~264) 메뉴는 삭제 대상에서 제외 | |
| list(compress(db_menus, db_not_found_filtered)), # FIXME: Exclude festival restaurants (250~264) menus from deletion |
No description provided.