feat: omit obituaries images from mosaic cover
Made-with: Cursor
This commit is contained in:
@@ -115,6 +115,8 @@ def regenerate(issue_id):
|
||||
|
||||
image_paths = []
|
||||
for a in articles_for_issue:
|
||||
if "Obituaries" in json.loads(a.categories):
|
||||
continue
|
||||
first_image = Image.query.filter_by(article_id=a.id).first()
|
||||
if first_image:
|
||||
image_paths.append(first_image.local_path)
|
||||
|
||||
@@ -171,6 +171,8 @@ def create_issue():
|
||||
|
||||
image_paths = []
|
||||
for a in articles_for_issue:
|
||||
if "Obituaries" in json.loads(a.categories):
|
||||
continue
|
||||
first_image = Image.query.filter_by(article_id=a.id).first()
|
||||
if first_image:
|
||||
image_paths.append(first_image.local_path)
|
||||
|
||||
@@ -83,6 +83,8 @@ class SchedulerManager:
|
||||
|
||||
image_paths = []
|
||||
for a in articles:
|
||||
if "Obituaries" in json.loads(a.categories):
|
||||
continue
|
||||
first_image = Image.query.filter_by(article_id=a.id).first()
|
||||
if first_image:
|
||||
image_paths.append(first_image.local_path)
|
||||
|
||||
Reference in New Issue
Block a user