mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Fixes for schema migrations and always set default country on clients
This commit is contained in:
parent
8d9950ebbd
commit
fcbef56e46
@ -58,7 +58,7 @@ class ClientRepository extends BaseRepository
|
||||
return $client;
|
||||
}
|
||||
|
||||
if(!$client->id && (!array_key_exists('country_id', $data) || empty($data['country_id']))){
|
||||
if(!$client->id && auth()->user() && auth()->user()->company() && (!array_key_exists('country_id', $data) || empty($data['country_id']))){
|
||||
$data['country_id'] = auth()->user()->company()->settings->country_id;
|
||||
}
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ CREATE TABLE `migrations` (
|
||||
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`batch` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `password_resets`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
|
Loading…
Reference in New Issue
Block a user