diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b27b7b1..127bcad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Tous les changements notables sur le projet sont documentés dans ce fichier. Ce projet adhère au principe du [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.0.2 (2024-12-10) + +- Corrige l'étape 3 de l'assistant d'installation. + ## 1.0.1 (2024-12-09) - Corrige un problème avec l'affichage des remises de matériel dans les devis et factures. diff --git a/VERSION b/VERSION index 7dea76ed..6d7de6e6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +1.0.2 diff --git a/server/src/App/Controllers/SetupController.php b/server/src/App/Controllers/SetupController.php index b21c4d73..3d09bebc 100644 --- a/server/src/App/Controllers/SetupController.php +++ b/server/src/App/Controllers/SetupController.php @@ -8,7 +8,6 @@ use Loxya\Errors\Exception\ValidationException; use Loxya\Http\Request; use Loxya\Models\Category; -use Loxya\Models\Country; use Loxya\Models\Enums\Group; use Loxya\Models\User; use Loxya\Services\I18n; @@ -293,7 +292,8 @@ private function _validateCompanyData($companyData): void new Rule\Key('country', V::custom( static function ($value) { V::notEmpty()->stringType()->check($value); - return Country::where('code', $value)->exists(); + $allCountries = array_column(Install::getAllCountries(), 'code'); + return in_array($value, $allCountries, true); }, )), );