fix: sync regions
This commit is contained in:
parent
7599641350
commit
6c1eaf4ea5
app/Initialize
|
@ -6,7 +6,7 @@ class InitializeRegions {
|
|||
|
||||
private $bar;
|
||||
private $api;
|
||||
private $nullName = 'Nicht-DE (Ausland)';
|
||||
private $nullName = 'Nicht-DE';
|
||||
|
||||
public function __construct($bar, $api) {
|
||||
$this->bar = $bar;
|
||||
|
@ -15,8 +15,8 @@ class InitializeRegions {
|
|||
|
||||
public function handle() {
|
||||
$this->bar->task('Synchronisiere Bundesländer', function() {
|
||||
collect($this->api->regions()->data)->each(function($region) {
|
||||
\App\Region::create(['nami_id' => $region->id, 'name' => $region->descriptor, 'is_null' => $region->descriptor === $this->nullName]);
|
||||
$this->api->regions()->each(function($region) {
|
||||
\App\Region::create(['nami_id' => $region->id, 'name' => $region->name, 'is_null' => $region->name == $this->nullName]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue