Allow translations of default column values (#5038)

Currently the default column values cannot be translated. This change will allow us to translate them.
This commit is contained in:
4NIK3T 2020-04-12 22:47:45 +05:30 committed by GitHub
parent b4c65e9feb
commit baca3c8adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1076,8 +1076,8 @@ class Lists extends WidgetBase
/*
* Apply default value.
*/
if ($value === '' || $value === null) {
$value = $column->defaults;
if (($value === '' || is_null($value)) && !empty($column->defaults)) {
$value = Lang::get($column->defaults);
}
/**