From 91069715650a2eb1cba17ed1c99e276250789b76 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 30 Mar 2017 16:30:22 -0400 Subject: [PATCH] closes #362 --- CHANGELOG.md | 3 +++ app/Repositories/NodeRepository.php | 15 +++------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc9e99937..8a96f583a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,12 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ## v0.6.0-pre.8 (Courageous Carniadactylus) ### Fixed * `[pre.7]` — Fixes bug with subuser checkbox display. +* `[pre.7]` — Fixes bug with injected JS that was causing `` to be ignored in templates. +* `[pre.7]` — Fixes exception thrown when trying to delete a node due to a misnamed model. ### Changed * Subuser permissions are now stored in `Permission::list()` to make views way cleaner and make adding to views significantly cleaner. +* `[pre.7]` — Sidebar for file manager now is a single link rather than a dropdown. ## v0.6.0-pre.7 (Courageous Carniadactylus) ### Fixed diff --git a/app/Repositories/NodeRepository.php b/app/Repositories/NodeRepository.php index 51a91cfe3..0b361c3d5 100644 --- a/app/Repositories/NodeRepository.php +++ b/app/Repositories/NodeRepository.php @@ -277,13 +277,9 @@ class NodeRepository throw new DisplayException('You cannot delete a node with servers currently attached to it.'); } - DB::beginTransaction(); - - try { + DB::transaction(function () use ($node) { // Unlink Database Servers - Models\DatabaseServer::where('linked_node', $node->id)->update([ - 'linked_node' => null, - ]); + Models\DatabaseHost::where('node_id', $node->id)->update(['node_id' => null]); // Delete Allocations Models\Allocation::where('node_id', $node->id)->delete(); @@ -293,11 +289,6 @@ class NodeRepository // Delete Node $node->delete(); - - DB::commit(); - } catch (\Exception $ex) { - DB::rollback(); - throw $ex; - } + }); } }