Unable to delete workspace if records have an attachment
Error received:
null value in column "authorId" of relation "attachment" violates not-null constraint
How to fix?

8 Replies
Hello @arnavsaxena, what version of twenty are you running ? ( If you're on the latest please describe how you inserted an attachement that has no authorId, such as through api ? )
To address your issue go in database and find null authotId row and delete it manually then you should be able to delete the workspace
( Ps screenshot is weirdly cropped)
But all my rows have authorId in them. I use the API

Running twenty .42
After I remove all the attachments, I can delete the workspace
So intriguing
Mhm there might be a bug when deleting a workspace containing attachements, would you be able to reproduce by creating a workspace with an attachement and delete it ? Will attempt to do so on the latest 0.43
Were you able to reproduce?
@arnavsaxena I believe it's similar case to this https://github.com/twentyhq/twenty/issues/7755
GitHub
Account can't be deleted if file is uploaded · Issue #7755 · twenty...
Scenario: Log in Go to People tab Check details of any existing record Upload file Go to Settings > Profile Click "Delete account" button Type email in input and click "Delete acc...
Yes that’s right