Warne vor bereits eingefügten Quelldokumenten und biete Nicht einfügen, erneut einfügen oder zusätzliches Einbinden an.
Deploy Development / deploy (push) Successful in 44s
Deploy Development / deploy (push) Successful in 44s
Prüfstufen hier, darin, Umfeld stehen als Kontoeinstellung bereit. Der Server antwortet bei einem sicheren Treffer mit 409 und bindet auf Wunsch das vorhandene Element zusätzlich ein. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a6dc24d8fe
commit
f925661937
19 files changed
+748
-133
No files matched your search
@@ -34,6 +34,7 @@ from app.access.policy import (
|
||||
)
|
||||
from app.access.limits import ensure_can_add_member
|
||||
from app.api.deps import Principal, get_conn, get_principal, get_session
|
||||
from app.api.externals import place_external
|
||||
from app.api.schemas import (
|
||||
AcceptInviteIn,
|
||||
AnnotationIn,
|
||||
@@ -113,7 +114,6 @@ from app.ops import (
|
||||
create_chapter,
|
||||
create_cross_link,
|
||||
create_deadline,
|
||||
create_external,
|
||||
create_file,
|
||||
create_matter,
|
||||
create_note,
|
||||
@@ -860,21 +860,7 @@ def post_annotation(
|
||||
|
||||
@router.post("/api/v1/external-refs")
|
||||
def post_external(body: ExternalIn, principal: Principal = Depends(get_principal), conn: Connection = Depends(get_conn)):
|
||||
element = create_external(
|
||||
conn,
|
||||
principal.account_id,
|
||||
principal.scope_id,
|
||||
body.title,
|
||||
body.source,
|
||||
body.external_id,
|
||||
Ctx(body.context.kind, body.context.id),
|
||||
_ctx_model(body.placement),
|
||||
body.chapter_id,
|
||||
body.dates.document_on,
|
||||
body.dates.sent_on,
|
||||
body.dates.received_on,
|
||||
body.detail.model_dump(mode="json", exclude_none=True) if body.detail else None,
|
||||
)
|
||||
element = place_external(conn, principal, body)
|
||||
return _created(f"/api/v1/elements/{element['id']}", {"id": str(element["id"]), "title": element["title"]})
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user