Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,22 @@ def compare_menus(db_menus, crawled_meals, restaurants):
db_menus[db_idx]["previous_" + field] = db_menus[db_idx].pop(field, None)
db_menus[db_idx][field] = crawled_menus[crawled_idx].get(field)
break
############
# 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)
######
Comment on lines +75 to +87
Copy link

Copilot AI Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copilot uses AI. Check for mistakes.
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) 메뉴는 삭제 대상에서 제외
Copy link

Copilot AI Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
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

Copilot uses AI. Check for mistakes.
list(compress(db_menus, edited)),
)

Expand Down
Loading
Loading