diff --git a/lib/Dto/Column.php b/lib/Dto/Column.php index 9d4f61fb4c..5a321f1aee 100644 --- a/lib/Dto/Column.php +++ b/lib/Dto/Column.php @@ -38,6 +38,11 @@ public function __construct( } public static function createFromArray(array $data): self { + $customSettings = $data['customSettings'] ?? null; + if (is_array($customSettings)) { + $customSettings = json_encode($customSettings); + } + return new self( title: $data['title'] ?? null, type: $data['type'] ?? null, @@ -63,7 +68,7 @@ public static function createFromArray(array $data): self { usergroupSelectGroups: $data['usergroupSelectGroups'] ?? null, usergroupSelectTeams: $data['usergroupSelectTeams'] ?? null, showUserStatus: $data['showUserStatus'] ?? null, - customSettings: $data['customSettings'] ?? null, + customSettings: $customSettings, ); }