Skip to content

Commit a5333e7

Browse files
committed
Bugfix entity type
1 parent 8e07530 commit a5333e7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Models/TemplateModel.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ class TemplateModel extends Model
2828
* @throws TemplatesException
2929
*/
3030
public function findByName(string $name): Template
31-
{
32-
if ($template = $this->where('name', $name)->first())
33-
{
34-
return $template;
35-
}
31+
{
32+
if ($template = $this->where('name', $name)->first())
33+
{
34+
return $template;
35+
}
3636

3737
throw TemplatesException::forMissingTemplate($name);
38-
}
38+
}
3939
}

src/Views/Templates/form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class="form-control"
3030
<option value="">NONE</option>
3131

3232
<?php foreach ($templates as $temp): ?>
33-
<?php if ($temp->id === $template->id): continue; endif; ?>
34-
<option value="<?= $temp->id ?>" <?= $temp->id === $template->parent_id ? 'selected' : '' ?>><?= $temp->name ?></option>
33+
<?php if ($temp->id == $template->id): continue; endif; ?>
34+
<option value="<?= $temp->id ?>" <?= $temp->id == $template->parent_id ? 'selected' : '' ?>><?= $temp->name ?></option>
3535
<?php endforeach; ?>
3636

3737
</select>

0 commit comments

Comments
 (0)