mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Various CSV bugs and a config bug fixed.
This commit is contained in:
@@ -87,16 +87,26 @@ class FireflyConfig
|
||||
*/
|
||||
public function set($name, $value): Configuration
|
||||
{
|
||||
//
|
||||
Log::debug('Set new value for ', ['name' => $name]);
|
||||
$config = Configuration::whereName($name)->first();
|
||||
if (is_null($config)) {
|
||||
Log::debug('Does not exist yet ', ['name' => $name]);
|
||||
$item = new Configuration;
|
||||
$item->name = $name;
|
||||
$item->data = $value;
|
||||
$item->save();
|
||||
|
||||
$item = new Configuration;
|
||||
$item->name = $name;
|
||||
$item->data = $value;
|
||||
$item->save();
|
||||
Cache::forget('ff-config-' . $name);
|
||||
|
||||
Cache::forget('ff-config-' . $name);
|
||||
return $item;
|
||||
} else {
|
||||
Log::debug('Exists already ', ['name' => $name]);
|
||||
$config->data = $value;
|
||||
$config->save();
|
||||
Cache::forget('ff-config-' . $name);
|
||||
|
||||
return $item;
|
||||
return $config;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user