Use the database values in the current instance

This commit is contained in:
tcely authored and GitHub committed 2024-12-18 05:11:26 -05:00
1 parent 2ffeb5e8ea
commit 3a2157e9b3
1 file changed
+1
+1
View File
@@ -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)