twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
23.36k stars 2.42k forks source link

Records are deleted using views and filters #8104

Open BOHEUS opened 4 weeks ago

BOHEUS commented 4 weeks ago

Scenario:

  1. Log in
  2. Go to People tab (or any other tab)
  3. Open Deleted records view
  4. Save it as new view
  5. Click "Add filter" button
  6. Save it as new view

Actual: All records disappear Screencast From 2024-10-26 21-22-04.webm

Workaround: If any record was deleted earlier or added to Favorites, check details of this record and delete again

Logs:

query failed: INSERT INTO "workspace_1wgvd1injqtife6y4rvfbu3h5"."viewFilter"("fieldMetadataId", "operand", "value", "displayValue", "viewFilterGroupId", "positionInViewFilterGroup", "id", "createdAt", "updatedAt", "deletedAt", "viewId") VALUES ($1, $2, $3, $4, $5, DEFAULT, $6, DEFAULT, DEFAULT, DEFAULT, $7) RETURNING "fieldMetadataId", "operand", "value", "displayValue", "viewFilterGroupId", "positionInViewFilterGroup", "id", "createdAt", "updatedAt", "deletedAt" -- PARAMETERS: ["a6f5739e-8491-4fe7-9c82-dcefaccbfa20","contains","","","56a2ab6a-6f62-42ed-9234-086aac766914","fdb57800-ea51-4f5f-bdd8-3b3a62fd44b2","81c4fa2c-507e-4a00-849f-8961f40a991a"]
error: error: duplicate key value violates unique constraint "PK_09f9ffa2f66263b9eb301460137"
Bonapara commented 3 weeks ago

Related to https://github.com/twentyhq/twenty/issues/8106