1
0
Fork 0
mirror of https://codeberg.org/Reuh/feather.git synced 2025-10-27 10:09:32 +00:00

fix: copy-paste mishaps

This commit is contained in:
Étienne Fildadut 2025-10-15 00:03:44 +02:00
parent 70f679f959
commit 0e4b6506b5

View file

@ -163,8 +163,8 @@ class Article(ABC):
"image_url", "image_url",
) )
d = {field: getattr(self, field) for field in template_fields} d = {field: getattr(self, field) for field in template_fields}
d["published"] = format_datetime(config, self.updated) d["published"] = format_datetime(config, self.published)
d["updated"] = format_datetime(config, self.published) d["updated"] = format_datetime(config, self.updated)
d["category"] = self.category.asdict() d["category"] = self.category.asdict()
return d return d
@ -225,7 +225,7 @@ class Article(ABC):
html_path, config.article_template.render(self._get_template_dict()) html_path, config.article_template.render(self._get_template_dict())
) )
# set accessed date to update time, modified to publication time # set accessed date to update time, modified to publication time
os.utime(html_path, (max(self.updated, self.updated), self.published)) os.utime(html_path, (max(self.published, self.updated), self.published))
def _delete_html(self, missing_ok=False): def _delete_html(self, missing_ok=False):
"""Delete the HTML file associated with this article.""" """Delete the HTML file associated with this article."""