Error deleting emtpy (0 users, 0 items) organisation #1706

Closed
opened 2026-04-06 02:15:22 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @smainz on 3/9/2023

Subject of the issue

I have an organisation with 0 users and 0 items which I want to delete from the admin page.
grafik

Once I enter the correct UUID
grafik

I get this error message :

grafik

In the logs it complains about a foreign key constraint violation:

vaultwarden    | [2023-03-09 10:18:54.828][request][INFO] POST /admin/organizations/45f5a31c-51c7-4c65-a8f5-c049fbf39660/delete
vaultwarden    | [2023-03-09 10:18:54.839][error][ERROR] Error saving organization.
vaultwarden    | [CAUSE] DatabaseError(
vaultwarden    |     ForeignKeyViolation,
vaultwarden    |     "FOREIGN KEY constraint failed",
vaultwarden    | )
vaultwarden    | [2023-03-09 10:18:54.844][response][INFO] (delete_organization) POST /admin/organizations/<uuid>/delete => 400 Bad Request

Deployment environment

  • Vaultwarden version: v1.27.0
  • Web-vault version: v2022.12.0
  • Running within Docker: true (Base: Debian), Docker Image vaultwarden/server:latest
  • Database type: SQLite
  • Database version: 3.39.2
  • Clients used: Web-Vault (Admin page)
  • Reverse proxy and version: traefik 2.9.8 (probably not relevant)

Steps to reproduce

I am not really sure how to reproduce this as I can not create an empty organization. This organisation has been created by a user before I restricted the creation of organisations to myself. The user which created the organisationhas been deleted before.

The problem does not occur with organisations having a member.

Expected behaviour

I expected the organisation to be deleted.

Actual behaviour

The organisation still exists.

Troubleshooting data

What data do you need to analyse this?

*Originally created by @smainz on 3/9/2023* ### Subject of the issue I have an organisation with 0 users and 0 items which I want to delete from the admin page. ![grafik](https://user-images.githubusercontent.com/15262922/223991695-647b77e8-599f-4eb1-9cfb-f576c7fc8d51.png) Once I enter the correct UUID ![grafik](https://user-images.githubusercontent.com/15262922/223998099-985d9501-bca9-40e2-8de3-4336a9450eff.png) I get this error message : ![grafik](https://user-images.githubusercontent.com/15262922/223992245-1225619d-c6dc-4cfd-b26b-da43770dca06.png) In the logs it complains about a foreign key constraint violation: ``` vaultwarden | [2023-03-09 10:18:54.828][request][INFO] POST /admin/organizations/45f5a31c-51c7-4c65-a8f5-c049fbf39660/delete vaultwarden | [2023-03-09 10:18:54.839][error][ERROR] Error saving organization. vaultwarden | [CAUSE] DatabaseError( vaultwarden | ForeignKeyViolation, vaultwarden | "FOREIGN KEY constraint failed", vaultwarden | ) vaultwarden | [2023-03-09 10:18:54.844][response][INFO] (delete_organization) POST /admin/organizations/<uuid>/delete => 400 Bad Request ``` ### Deployment environment * Vaultwarden version: v1.27.0 * Web-vault version: v2022.12.0 * Running within Docker: true (Base: Debian), Docker Image vaultwarden/server:latest * Database type: SQLite * Database version: 3.39.2 * Clients used: Web-Vault (Admin page) * Reverse proxy and version: traefik 2.9.8 (probably not relevant) ### Steps to reproduce I am not really sure how to reproduce this as I can not create an empty organization. This organisation has been created by a user before I restricted the creation of organisations to myself. The user which created the organisationhas been deleted before. The problem does not occur with organisations having a member. ### Expected behaviour I expected the organisation to be deleted. ### Actual behaviour The organisation still exists. ### Troubleshooting data What data do you need to analyse this?
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1706