upstage-org / upstage

UpStage is a platform for cyberformance: remote players combine digital media in real-time for an online audience. All you need is a web browser!
https://upstage.org.nz
GNU General Public License v3.0
21 stars 0 forks source link

error message when trying to delete specific player #1289

Open helenvarley opened 5 months ago

helenvarley commented 5 months ago

on the QMU instance, i have successfully deleted a lot of players, but there are two accounts, both belonging to teddy, which i can't delete. this is the error message i get:

(psycopg2.errors.ForeignKeyViolation) update or delete on table "upstage_user" violates foreign key constraint "scene_owner_id_fkey" on table "scene" DETAIL: Key (id)=(123) is still referenced from table "scene". [SQL: DELETE FROM upstage_user WHERE upstage_user.id = %(id_1)s] [parameters: {'id_1': '123'}] (Background on this error at: https://sqlalche.me/e/14/gkpj)

note: this issue applies to all instances, not just QMU

gloriajw commented 5 months ago

This means a scene still belongs to him, and you need to reassign it or delete it first.

helenvarley commented 5 months ago

ah! thank you - it worked now. is it possible to have a meaningful message to that effect? i didn't understand that from the error message it gave.

vickis commented 4 months ago

This is the same as the one I reported earlier - where I found and deleted an old Stage which contained a scene - in that case the user was James :) 

13 Jun 2024 at 01:34 by @.***:

This means a scene still belongs to him, and you need to reassign it or delete it first.

— Reply to this email directly, > view it on GitHub https://github.com/upstage-org/upstage/issues/1289#issuecomment-2163026310> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/ABANO2QOTRWCMUDADLQD7XLZHBE7DAVCNFSM6AAAAABJGL63Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGAZDMMZRGA> . You are receiving this because you are subscribed to this thread.> Message ID: > <upstage-org/upstage/issues/1289/2163026310> @> github> .> com>

helenvarley commented 4 months ago

yes, but we're keeping this issue open as it needs a meaningful error message so that anyone encountering it will get the info they need to sort it out :)

helenvarley commented 4 months ago

the error message should say:

"The player you are trying to delete still owns a stage or media items on this UpStage instance. Please use the Studio to find these and either delete or assign to other players; then you will be able to delete this player."

(i don't think "scenes" are able to belong to a specific player, are they? there is no information anywhere about scenes belonging to anyone. i can see that it does say "scene" in the error message, but does this actually mean "scenes" - as in the scenes we can save on a stage - or "stages" - which are owned by a specific player?)

webdev604 commented 4 months ago

hi @gloriajw can you send the error messages on backend?

vickis commented 3 months ago

The scenes (like the stage would have to 'belong' to someone so I guess it would be by default whoever created them perhaps the assignee for scenes should be the stage (if that is possible)