Commit 88fe0e53 authored by Jan Reimes's avatar Jan Reimes
Browse files

fix(specs): add missing record_id to auto-crawl spec models

SpecificationVersion and SpecificationSourceRecord were constructed
without record_id during auto-crawl, causing Pydantic ValidationError
when adding specs to workspaces.
parent da28314d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ def _build_spec_versions(

        spec_versions.append(
            SpecificationVersion(
                record_id=f"{normalized}:{parse_spec_version_nbr(version)}:{source_name}",
                spec_number=normalized,
                version=parse_spec_version_nbr(version),
                file_name=file_name,
@@ -353,6 +354,7 @@ class SpecDatabase(DocDatabase):

            source_records.append(
                SpecificationSourceRecord(
                    record_id=f"{normalized}:{source_name}",
                    spec_number=normalized,
                    source_name=source_name,
                    source_identifier=source_identifier if isinstance(source_identifier, str) else None,