diff --git a/app/templates/admin/_augmented_part_fits.html b/app/templates/admin/_augmented_part_fits.html index 7269f7b..c5c870a 100644 --- a/app/templates/admin/_augmented_part_fits.html +++ b/app/templates/admin/_augmented_part_fits.html @@ -45,6 +45,13 @@
+ {% endif %} diff --git a/app/web/admin.py b/app/web/admin.py index 5dc057c..3091c07 100644 --- a/app/web/admin.py +++ b/app/web/admin.py @@ -2269,6 +2269,7 @@ async def create_augmented_part_fit( augmented_part_id: int, own_attachment_point_id: int = Form(...), other_attachment_point_id: str = Form(""), + label: FitLabel = Form(FitLabel.EXACT), db: AsyncSession = Depends(get_db), actor: User = Depends(web_require("fits:write")), ): @@ -2285,7 +2286,7 @@ async def create_augmented_part_fit( elif await fit_crud.get_by_attachment_points(db, ap_a, ap_b) is not None: error = "That fit already exists." else: - fit = await fit_crud.create(db, ap_a=ap_a, ap_b=ap_b, label=FitLabel.EXACT) + fit = await fit_crud.create(db, ap_a=ap_a, ap_b=ap_b, label=label) await audit_crud.log( db, actor=actor, @@ -2293,7 +2294,7 @@ async def create_augmented_part_fit( resource_type="Fit", resource_id=fit.id, description=audit_crud.describe_create( - "Fit", fit.id, f"attachment points {ap_a.id}↔{ap_b.id}" + "Fit", fit.id, f"attachment points {ap_a.id}↔{ap_b.id} ({label.value})" ), ) ctx = await _augmented_part_fits_ctx(