mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Improve comment
This commit is contained in:
parent
4bb19152c4
commit
7373e2019c
|
@ -109,8 +109,11 @@ class ReportTemplate extends Model
|
|||
return $fallbackValue;
|
||||
}
|
||||
|
||||
// Return the field's value if it exists and return 0
|
||||
// if not so that checkboxes are unchecked by default.
|
||||
// If the model does exist then return the value of the field
|
||||
// or return 0 so the checkbox is unchecked.
|
||||
// Falling back to 0 here is because checkboxes are not sent
|
||||
// in the request when unchecked so they are not
|
||||
// actually saved in the model's options.
|
||||
return $this->options[$fieldName] ?? '0';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue