번역오류 수정 및 CTA적용
This commit is contained in:
commit
788e76ef76
8 files changed
+216
-37
No files matched your search
@@ -946,6 +946,11 @@ async def tagging_images(
|
||||
async with AsyncSessionLocal() as session:
|
||||
for tag, tag_data in zip(null_imts, tag_datas):
|
||||
if isinstance(tag_data, Exception):
|
||||
# 태깅 실패 이미지는 img_tag가 NULL로 남아 영상 생성 풀에서 제외됨
|
||||
logger.warning(
|
||||
f"[tagging_images] 이미지 태깅 최종 실패 - url: {tag.img_url}, "
|
||||
f"error: {type(tag_data).__name__}: {tag_data}"
|
||||
)
|
||||
continue
|
||||
tag.img_tag = tag_data.model_dump(mode="json")
|
||||
session.add(tag)
|
||||
|
||||
+4
-2
@@ -370,8 +370,10 @@ class ImageTag(Base):
|
||||
)
|
||||
|
||||
img_tag: Mapped[dict[str, Any]] = mapped_column(
|
||||
JSON,
|
||||
# none_as_null=True: ORM에서 None 대입 시 JSON 리터럴 null이 아닌 SQL NULL로 저장.
|
||||
# 미지정 시 JSON null이 저장되어 `img_tag.is_not(None)` 필터를 통과하는 버그가 있었음.
|
||||
JSON(none_as_null=True),
|
||||
nullable=True,
|
||||
default=False,
|
||||
default=None,
|
||||
comment="태그 JSON",
|
||||
)
|
||||
Reference in new issue
Block a user