Skip to content
Snippets Groups Projects
Commit bbd0c255 authored by JediKev's avatar JediKev
Browse files

issue: Delete Org Session Failure

This addresses an issue on the Forum where deleting an Organization causes
the session to fail. This is due to the Organization QuerySet being stored
in the session and not being cleared out when deleted from the system. This
causes the system to try to refetch the object from the database which it's
not there as it's been deleted and therefore causes the session to crash.
parent fe28bc52
No related branches found
No related tags found
No related merge requests found
......@@ -486,6 +486,9 @@ implements TemplateVariable, Searchable {
if (!parent::delete())
return false;
// Clear organization from session to avoid refetch failure
unset($_SESSION[':Q:orgs'], $_SESSION[':O:tickets']);
// Remove users from this organization
User::objects()
->filter(array('org' => $this))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment