Fix modifica fasce orarie

This commit is contained in:
valentina 2024-06-27 10:01:21 +02:00
parent 6f8c258382
commit 9fd43f2f60
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ switch (post('op')) {
$is_predefined = post('is_predefined');
if (isset($descrizione)) {
$fascia_oraria_new = FasciaOraria::where('id', '=', (new FasciaOraria())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first();
$fascia_oraria_new = FasciaOraria::where('id', '=', (new FasciaOraria())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first();
if (empty($fascia_oraria_new)) {
if (!empty($is_predefined)) {
$dbo->query('UPDATE `in_fasceorarie` SET `predefined` = 0');