Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: relation hotfix (#4837)

Richard Shiue270d1c68b29a
diff --git a/frontend/rust-lib/flowy-database2/src/services/field/type_options/relation_type_option/relation.rs b/frontend/rust-lib/flowy-database2/src/services/field/type_options/relation_type_option/relation.rs
index 357729a0c8..4bc7fd3d08 100644
--- a/frontend/rust-lib/flowy-database2/src/services/field/type_options/relation_type_option/relation.rs
+++ b/frontend/rust-lib/flowy-database2/src/services/field/type_options/relation_type_option/relation.rs
@@ -60,7 +60,7 @@ impl CellDataChangeset for RelationTypeOption {
let cell_data: RelationCellData = cell.unwrap().as_ref().into();
let mut row_ids = cell_data.row_ids.clone();
for inserted in changeset.inserted_row_ids.iter() {
- if row_ids.iter().any(|row_id| row_id == inserted) {
+ if !row_ids.iter().any(|row_id| row_id == inserted) {
row_ids.push(inserted.clone())
}
}