mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-03 09:57:45 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
73ec84903e
|
@ -108,15 +108,19 @@ class LdapSync extends Command
|
||||||
$location = null; // TODO - this would be better called "$default_location", which is more explicit about its purpose
|
$location = null; // TODO - this would be better called "$default_location", which is more explicit about its purpose
|
||||||
|
|
||||||
if ($this->option('location') != '') {
|
if ($this->option('location') != '') {
|
||||||
$location = Location::where('name', '=', $this->option('location'))->first();
|
if ($location = Location::where('name', '=', $this->option('location'))->first()) {
|
||||||
Log::debug('Location name '.$this->option('location').' passed');
|
Log::debug('Location name '.$this->option('location').' passed');
|
||||||
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
|
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
|
||||||
|
}
|
||||||
|
|
||||||
} elseif ($this->option('location_id') != '') {
|
} elseif ($this->option('location_id') != '') {
|
||||||
$location = Location::where('id', '=', $this->option('location_id'))->first();
|
if ($location = Location::where('id', '=', $this->option('location_id'))->first()) {
|
||||||
Log::debug('Location ID '.$this->option('location_id').' passed');
|
Log::debug('Location ID '.$this->option('location_id').' passed');
|
||||||
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
|
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (! isset($location)) {
|
if (! isset($location)) {
|
||||||
Log::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
|
Log::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue