Format and fix logged out bug for most recent orgs
This commit is contained in:
parent
103a4bb69d
commit
30f1c105cb
6 changed files with 703 additions and 12 deletions
|
@ -39,7 +39,13 @@ from judge.models.problem_data import (
|
|||
problem_data_storage,
|
||||
problem_directory_file,
|
||||
)
|
||||
from judge.models.profile import Organization, OrganizationRequest, Profile, Friend, OrganizationProfile
|
||||
from judge.models.profile import (
|
||||
Organization,
|
||||
OrganizationRequest,
|
||||
Profile,
|
||||
Friend,
|
||||
OrganizationProfile,
|
||||
)
|
||||
from judge.models.runtime import Judge, Language, RuntimeVersion
|
||||
from judge.models.submission import (
|
||||
SUBMISSION_RESULT,
|
||||
|
|
|
@ -445,7 +445,9 @@ class OrganizationProfile(models.Model):
|
|||
|
||||
@classmethod
|
||||
def remove_organization(self, users, organization):
|
||||
organizationprofile = self.objects.filter(users=users, organization=organization)
|
||||
organizationprofile = self.objects.filter(
|
||||
users=users, organization=organization
|
||||
)
|
||||
if organizationprofile.exists():
|
||||
organizationprofile.delete()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue