fix enable dataset metadata built-in field when dataset is empty (#16290)

This commit is contained in:
Jyong 2025-03-20 14:38:32 +08:00 committed by GitHub
parent 2c9af712a2
commit 3e84c77bbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,7 +137,7 @@ class MetadataService:
doc_metadata[BuiltInField.source.value] = MetadataDataSource[document.data_source_type].value
document.doc_metadata = doc_metadata
db.session.add(document)
db.session.commit()
db.session.commit()
except Exception:
logging.exception("Enable built-in field failed")
finally: