-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting organisation while user is still in it, causes 500 error #614
Comments
It seems this issue has been resolved. |
I tried to reproduce it. I faced all the above problems, in addition also removing the organization from admin account yielded with 500 error. This error was triggered: Btw, why is organization an User instance? |
@glothriel Did you set a custom avatar for that organisation? |
I had custom avatars for the orgs |
@Bwko Nope |
I can reproduce this issue and fix in this pull request #633. |
Reproduce process in https://try.gitea.io/ :
|
Version: 6aacf4d
OS: Debian stable
[x]
):Description
I've created some organisations, but wanting to keep them 'hidden' from the explore mode to non-logged in users. It seems that this wasn't possible, so I wanted to remove these organisations again.
I had created the orgs with my regular user account, and later removed them with the administrator account.
When logging in with my regular user account, the dashboard, issues and pull-request pages would give 500 errors, explore would work correctly.
It seems that the entries are not removed from the org_user table, after manually removing these, the 500 error disappeared:
sqlite> select * from org_user;
1|1|3|0|0|0
2|2|3|1|1|1
3|2|4|0|1|1
4|2|5|0|1|1
As my only remaining org had org_id 3, I did the following:
sqlite> delete from org_user where org_id > 3;
sqlite> select * from org_user;
1|1|3|0|0|0
2|2|3|1|1|1
sqlite>
this solved this issue, but removing a non-empty org should not be possible, or cascade and remove the relevant org_user entries.
The text was updated successfully, but these errors were encountered: