From b1110beeaf9686fe8026bc2a477fc90efc2cec94 Mon Sep 17 00:00:00 2001 From: Thelonius Kort Date: Wed, 4 Jan 2023 15:28:30 +0100 Subject: [PATCH] Add default values for language in Article and Translation --- lib/outlook/articles/article.ex | 2 +- lib/outlook/translations/translation.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/outlook/articles/article.ex b/lib/outlook/articles/article.ex index 86e7f9c..8477089 100644 --- a/lib/outlook/articles/article.ex +++ b/lib/outlook/articles/article.ex @@ -9,7 +9,7 @@ defmodule Outlook.Articles.Article do schema "articles" do field :content, InternalTree field :date, :utc_datetime - field :language, :string + field :language, :string, default: "EN" field :title, :string field :url, :string belongs_to :author, Author diff --git a/lib/outlook/translations/translation.ex b/lib/outlook/translations/translation.ex index c3e2b33..3bac399 100644 --- a/lib/outlook/translations/translation.ex +++ b/lib/outlook/translations/translation.ex @@ -9,7 +9,7 @@ defmodule Outlook.Translations.Translation do schema "translations" do field :content, TranslationUnitsMap field :date, :utc_datetime - field :lang, :string + field :lang, :string, default: "DE" field :public, :boolean, default: false field :teaser, :string field :title, :string