From e889a6b308d3c841f5353e57960bfade881f2855 Mon Sep 17 00:00:00 2001 From: jonholdsworth <82071930+jonholdsworth@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:09:43 +1000 Subject: [PATCH] CC-2137: use `name` instead of `path` (#174) Micky Vale was still getting errors on UAT when she tried to create a new Gloss. This should hopefully fix this. ## JIRA Ticket [CC-2137 NZSL: move signbank to Poetry](https://ackama.atlassian.net/browse/CC-2137) ## Changes - `GlossVideo` method `rename_video()` uses `name` instead of `path` from `storage`, see Notes below ## Notes - A Stack Overflow that describes the `path` / `name` issue: https://stackoverflow.com/a/69135593 --- signbank/video/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signbank/video/models.py b/signbank/video/models.py index 1aa8ede0..8de46671 100644 --- a/signbank/video/models.py +++ b/signbank/video/models.py @@ -197,7 +197,7 @@ def rename_video(self): # Set the actual file path to videofile. self.videofile = saved_file_path - old_file.storage.delete(old_file.path) + old_file.storage.delete(old_file.name) def create_filename(self): """Returns a correctly named filename"""