Skip to content
Snippets Groups Projects
Unverified Commit eb9db7fc authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4740 from JediKev/issue/delete-org-session-failure

issue: Delete Org Session Failure
parents 77a2eda2 eb4bda84
No related branches found
No related tags found
No related merge requests found
...@@ -486,6 +486,9 @@ implements TemplateVariable, Searchable { ...@@ -486,6 +486,9 @@ implements TemplateVariable, Searchable {
if (!parent::delete()) if (!parent::delete())
return false; return false;
// Clear organization from session to avoid refetch failure
unset($_SESSION[':Q:orgs'], $_SESSION[':O:tickets']);
// Remove users from this organization // Remove users from this organization
User::objects() User::objects()
->filter(array('org' => $this)) ->filter(array('org' => $this))
......
...@@ -717,9 +717,11 @@ class VerySimpleModel { ...@@ -717,9 +717,11 @@ class VerySimpleModel {
} }
private function refetch() { private function refetch() {
$this->ht = try {
static::objects()->filter($this->getPk())->values()->one() $this->ht =
+ $this->ht; static::objects()->filter($this->getPk())->values()->one()
+ $this->ht;
} catch (DoesNotExist $ex) {}
} }
private function getPk() { private function getPk() {
......
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