mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Show user info about mandatory updates.
This commit is contained in:
@@ -46,7 +46,7 @@ class FireflyConfig
|
||||
Cache::forget($fullName);
|
||||
}
|
||||
try {
|
||||
Configuration::where('name', $name)->delete();
|
||||
Configuration::where('name', $name)->forceDelete();
|
||||
} catch (Exception $e) { // @phpstan-ignore-line
|
||||
// @ignoreException
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class FireflyConfig
|
||||
public function set(string $name, $value): Configuration
|
||||
{
|
||||
try {
|
||||
$config = Configuration::whereName($name)->first();
|
||||
$config = Configuration::whereName($name)->whereNull('deleted_at')->first();
|
||||
} catch (QueryException | Exception $e) { // @phpstan-ignore-line
|
||||
$item = new Configuration;
|
||||
$item->name = $name;
|
||||
@@ -146,12 +146,12 @@ class FireflyConfig
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
if (null === $config) {
|
||||
$item = new Configuration;
|
||||
$item->name = $name;
|
||||
$item->data = $value;
|
||||
$item->save();
|
||||
|
||||
Cache::forget('ff-config-' . $name);
|
||||
|
||||
return $item;
|
||||
|
Reference in New Issue
Block a user