feat: allow insertion of standalone view

This commit is contained in:
Zack Fu Zi Xiang 2024-09-09 18:10:12 +08:00
parent 99677acd4d
commit 572e18e88a
No known key found for this signature in database
1 changed files with 4 additions and 1 deletions

View File

@ -261,7 +261,10 @@ impl PublishCollabDuplicator {
let mut inserted = vec![];
for (view_id, view) in views_to_add.iter() {
if duplicated_view_ids.contains(&view.parent_view_id) {
// allow to insert if parent view is already inserted
// or if view is standalone (view_id == parent_view_id)
if duplicated_view_ids.contains(&view.parent_view_id) || *view_id == view.parent_view_id
{
folder
.body
.views