From fd4f540becaab263d7fc8149907f81a417ca44bb Mon Sep 17 00:00:00 2001 From: Alex Kulikov Date: Tue, 19 May 2026 01:43:27 +0100 Subject: [PATCH] fix: relax publication plans validation rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove title custom field validation (card.name is used as fallback) - Skip author check for cards labelled with "Телеграм" Co-Authored-By: Claude Sonnet 4.6 --- src/jobs/publication_plans_job.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/jobs/publication_plans_job.py b/src/jobs/publication_plans_job.py index e581b54..3db4fc7 100644 --- a/src/jobs/publication_plans_job.py +++ b/src/jobs/publication_plans_job.py @@ -101,12 +101,10 @@ def _retrieve_cards_for_paragraph( ] is_archive_card = load("common_trello_label__archive") in label_names + is_telegram_card = any("Телеграм" in name for name in label_names) missing_fields = [] - if not card_fields.title or not card_fields.title.strip(): - missing_fields.append("название") - error_display_name = ( card_fields.title.strip() if card_fields.title and card_fields.title.strip() @@ -118,7 +116,7 @@ def _retrieve_cards_for_paragraph( if not card_fields.google_doc: missing_fields.append("ссылка на Google Doc") - if ( + if not is_telegram_card and ( not card_fields.authors or len(card_fields.authors) == 0 or not any(author and author.strip() for author in card_fields.authors)