Skip to content

Commit e2b15b3

Browse files
authored
Fix template not being set correctly (#415)
* Fix template not being set correctly * fallback
1 parent 40e99ad commit e2b15b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Entries/Entry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ public static function makeModelFromContract(EntryContract $source)
128128
'order' => $source->order(),
129129
];
130130

131-
if ($source->template) {
132-
$attributes['data']->put('template', $source->template);
131+
if ($template = $source->get('template', $source->template)) {
132+
$attributes['data']->put('template', $template);
133133
}
134134

135135
$attributes['data'] = $attributes['data']->filter(fn ($v) => $v !== null);

0 commit comments

Comments
 (0)