Klappe Geizhals-Filtergruppen beim Lernen auf und nimm neue Kategorien ueber den Quellpfad auf.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
46857715df
commit
2117ca6b54
10 files changed
+203
-25
No files matched your search
@@ -100,7 +100,18 @@ class TaxonomyService:
|
||||
if catalog.get_source(source_id) is None:
|
||||
raise AppError(404, "NOT_FOUND", "source not found", {"source_id": source_id})
|
||||
adapter = self.adapter or discovery_adapter(source_id)
|
||||
existing = self.session.scalars(
|
||||
select(SourceCategoryRecord).where(
|
||||
SourceCategoryRecord.source_id == source_id,
|
||||
SourceCategoryRecord.external_category_key == category_key,
|
||||
)
|
||||
).first()
|
||||
try:
|
||||
payload = adapter.discover_taxonomy(
|
||||
category_key,
|
||||
source_url=None if existing is None else existing.source_url,
|
||||
)
|
||||
except TypeError:
|
||||
payload = adapter.discover_taxonomy(category_key)
|
||||
except AppError as exc:
|
||||
category = self.session.scalars(
|
||||
|
||||
Reference in new issue
Block a user