Fix tests

This commit is contained in:
Dane Everitt 2017-10-23 20:12:15 -05:00
parent d50ea18598
commit 532025a348
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 463 additions and 573 deletions

View file

@ -9,6 +9,7 @@
namespace Pterodactyl\Services\Databases;
use Pterodactyl\Models\Database;
use Illuminate\Database\DatabaseManager;
use Illuminate\Contracts\Encryption\Encrypter;
use Pterodactyl\Extensions\DynamicDatabaseConnection;
@ -95,7 +96,7 @@ class DatabaseManagementService
$this->database->commit();
} catch (\Exception $ex) {
try {
if (isset($database)) {
if (isset($database) && $database instanceof Database) {
$this->repository->dropDatabase($database->database);
$this->repository->dropUser($database->username, $database->remote);
$this->repository->flush();