fix: fixed TD-01 and TD-25

This commit is contained in:
2026-06-11 12:13:14 +02:00
parent e6a2055e18
commit 21b11ef87e
21 changed files with 826 additions and 69 deletions

View File

@@ -82,20 +82,16 @@ defmodule BDS.Rendering.TemplateSelection do
end
defp select_template(project_id, :post, nil) do
case StarterTemplates.default_slug(:post) do
nil ->
nil
default_slug = StarterTemplates.default_slug(:post)
default_slug ->
Repo.one(
from template in Template,
where:
template.project_id == ^project_id and template.kind == :post and
template.status == :published and
template.enabled == true and template.slug == ^default_slug,
limit: 1
)
end
Repo.one(
from template in Template,
where:
template.project_id == ^project_id and template.kind == :post and
template.status == :published and
template.enabled == true and template.slug == ^default_slug,
limit: 1
)
end
defp select_template(project_id, kind, nil) do