From 3a2157e9b37c5bdfc6f2118190be104d5d32e702 Mon Sep 17 00:00:00 2001 From: tcely Date: Wed, 18 Dec 2024 05:11:26 -0500 Subject: [PATCH] Use the database values in the current instance --- tubesync/sync/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index f0aff808..babbebb6 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1554,6 +1554,7 @@ class Media(models.Model): # update the media_file in the db self.media_file.name = str(new_video_path.relative_to(media_file_storage.location)) self.save(update_fields={'media_file'}) + self.refresh_from_db(fields={'media_file'}) # set up new stem and destination directory stem = Path(new_video_path.stem)