diff --git a/aleksis/apps/chronos/models.py b/aleksis/apps/chronos/models.py index 97f0ee3628e6f9c791882905634bf9e2b4f9dfd0..c57a874c5ae2367d6b04cb1228ec9d3b9fe3b76b 100644 --- a/aleksis/apps/chronos/models.py +++ b/aleksis/apps/chronos/models.py @@ -1229,27 +1229,6 @@ class AutomaticPlan(ExtensibleModel): """Get filename (without path) of the PDF file.""" return f"{self.slug}.pdf" - @property - def path(self) -> str: - """Get the relative path of the PDF file in the media directory.""" - return os.path.join("chronos", "plans", self.filename) - - @property - def local_path(self) -> str: - """Get the full path under which the PDF file can accessed on the local system.""" - try: - return default_storage.path(self.path) - except NotImplementedError: - return self.path - - def save(self, *args, **kwargs): - super().save(*args, **kwargs) - - if self.current_file: - if default_storage.exists(self.path): - default_storage.delete(self.path) - default_storage.save(self.path, self.current_file.file) - class Meta: verbose_name = _("Automatic plan") verbose_name_plural = _("Automatic plans") diff --git a/aleksis/apps/chronos/tables.py b/aleksis/apps/chronos/tables.py index bb699dcbc45255bf31ef9a95f73ae8f69f4f9ff7..54acc9a16fe4610d8d9cc827b8ac87aed14ed736 100644 --- a/aleksis/apps/chronos/tables.py +++ b/aleksis/apps/chronos/tables.py @@ -52,7 +52,6 @@ class AutomaticPlanTable(tables.Table): name = tables.LinkColumn("edit_automatic_plan", args=[A("id")]) filename = tables.LinkColumn("show_automatic_plan", args=[A("slug")]) - local_path = tables.Column() last_update = tables.DateTimeColumn() last_update_triggered_manually = tables.BooleanColumn() edit = tables.LinkColumn(