From e8509e44b1635d35d16f533d94a041ca22057bdb Mon Sep 17 00:00:00 2001
From: Ivan <8611739+IRBorisov@users.noreply.github.com>
Date: Tue, 25 Mar 2025 23:00:50 +0300
Subject: [PATCH] M: Improve fullname label and fix clone defaults
---
rsconcept/backend/apps/library/views/library.py | 2 +-
.../library/dialogs/dlg-clone-library-item.tsx | 2 +-
.../pages/create-item-page/form-create-item.tsx | 2 +-
.../tab-input-operation.tsx | 2 +-
.../tab-synthesis-operation.tsx | 2 +-
.../dlg-edit-operation/tab-operation.tsx | 2 +-
.../pages/oss-page/editor-oss-card/form-oss.tsx | 2 +-
.../editor-rsform-card/form-rsform.tsx | 17 ++++++++++-------
8 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/rsconcept/backend/apps/library/views/library.py b/rsconcept/backend/apps/library/views/library.py
index 2a176c48..4bd0996e 100644
--- a/rsconcept/backend/apps/library/views/library.py
+++ b/rsconcept/backend/apps/library/views/library.py
@@ -168,7 +168,7 @@ class LibraryViewSet(viewsets.ModelViewSet):
with transaction.atomic():
clone.save()
- need_filter = 'items' in request.data
+ need_filter = 'items' in request.data and len(request.data['items']) > 0
for cst in RSForm(item).constituents():
if not need_filter or cst.pk in request.data['items']:
cst.pk = None
diff --git a/rsconcept/frontend/src/features/library/dialogs/dlg-clone-library-item.tsx b/rsconcept/frontend/src/features/library/dialogs/dlg-clone-library-item.tsx
index 2da57c84..063269b0 100644
--- a/rsconcept/frontend/src/features/library/dialogs/dlg-clone-library-item.tsx
+++ b/rsconcept/frontend/src/features/library/dialogs/dlg-clone-library-item.tsx
@@ -68,7 +68,7 @@ export function DlgCloneLibraryItem() {
>