Description
When creating an Identity for an existing user from the Accounts tab, the UI shows a success toast (“Element created”), followed shortly by an error toast (“Element does not exist”).
Despite the error, the Identity record is actually created and appears in the Identities tab, but it is not linked to the selected user.
Network inspection and backend logs indicate that, after creation, the UI attempts to query the accounts endpoint with a null account ID, resulting in a 400 error from PostgREST and preventing the identity from being properly associated.
To Reproduce
Steps to reproduce the behavior:
- Go to the Accounts tab in the admin UI.
- Click Create Identity inside one of the rows of the Accounts table
- Observe a toast saying “Element created”.
- After a few seconds, observe a second toast saying “Element does not exist”.
- Navigate to the Identities tab and see that the identity exists but is not linked to the user.
Expected behavior
The identity should be created and correctly linked to the selected user, with only a single success notification and no error toast.
Screenshots
N/A
Hardware
- Device: Desktop
- OS: Windows 11
- Browser: Firefox
Additional context
The failing request is:
GET /api/postgrest/accounts?id=eq.null
which returns 400 Bad Request.
Backend logs show successful identity queries but failed account lookups due to a null account ID:
invalid input syntax for type bigint: "null"
The identity record is successfully created in the database, but the post-creation linking step fails.
Description
When creating an Identity for an existing user from the Accounts tab, the UI shows a success toast (“Element created”), followed shortly by an error toast (“Element does not exist”).
Despite the error, the Identity record is actually created and appears in the Identities tab, but it is not linked to the selected user.
Network inspection and backend logs indicate that, after creation, the UI attempts to query the accounts endpoint with a null account ID, resulting in a 400 error from PostgREST and preventing the identity from being properly associated.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The identity should be created and correctly linked to the selected user, with only a single success notification and no error toast.
Screenshots
N/A
Hardware
Additional context
The failing request is:
GET /api/postgrest/accounts?id=eq.nullwhich returns 400 Bad Request.
Backend logs show successful identity queries but failed account lookups due to a null account ID:
invalid input syntax for type bigint: "null"The identity record is successfully created in the database, but the post-creation linking step fails.