Skip to content

Commit cd95883

Browse files
committed
test
1 parent e5302dd commit cd95883

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI/CD
22

33
on:
44
push:
5-
branches: [ "feature/pje" ] # 운영은 main으로 전환 권장
5+
branches: [ "feature/jhs" ] # 운영은 main으로 전환 권장
66
workflow_dispatch:
77

88
concurrency:

apps/places/management/commands/load_places.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ def norm(s: str) -> str:
2525
return re.sub(r"[\s\(\)\[\]\-_/·•~!@#$%^&*=+|:;\"'<>?,.]+", "", s).lower()
2626

2727

28+
def to_bool(v) -> bool:
29+
if v is None:
30+
return False
31+
if isinstance(v, (int, float)):
32+
return v != 0
33+
s = str(v).strip().lower()
34+
return s in {"1", "true", "t", "y", "yes", "on"}
35+
2836
class Command(BaseCommand):
2937
help = "CSV(필수) + (선택) FAISS index에서 Place 및 임베딩을 DB에 적재 (진행률/ETA/막대 표시)."
3038

@@ -144,7 +152,8 @@ def handle(self, *args, **opts):
144152
lng = row.get("경도") or row.get("lng")
145153
summary = row.get("summary", "")
146154
external_id = row.get("external_id", None)
147-
is_unique = str(row.get("is_unique", "0")).strip() in ["1", "True", "true"]
155+
is_unique = to_bool(row.get("is_unique", 0))
156+
148157
raw_cls = row.get("class", "0")
149158

150159
# 필수 필드 검증

0 commit comments

Comments
 (0)