remove old image fields - migrated to library

This commit is contained in:
Tobias Brunner 2025-07-08 11:45:13 +02:00
parent 93eb45930a
commit 272e068a12
No known key found for this signature in database
6 changed files with 16 additions and 56 deletions

View file

@ -20,13 +20,6 @@ class Article(ImageReference):
meta_keywords = models.CharField(
max_length=255, blank=True, help_text="SEO keywords separated by commas"
)
# Original image field - keep temporarily for migration
image = models.ImageField(
upload_to="article_images/",
help_text="Title picture for the article",
null=True,
blank=True,
)
author = models.ForeignKey(User, on_delete=models.CASCADE, related_name="articles")
article_date = models.DateField(
default=timezone.now, help_text="Date of the article publishing"
@ -92,10 +85,10 @@ class Article(ImageReference):
@property
def get_image(self):
"""Returns the image from library or falls back to legacy image"""
"""Returns the image from the library"""
if self.image_library and self.image_library.image:
return self.image_library.image
return self.image
return None
@property
def related_to(self):