From 1d9fe2f6499258f46e8551702598c5fc8e8a45f9 Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 16 Jan 2022 10:27:24 -0700 Subject: [PATCH] Setting channel id rather than channel because the channel may be in a different session. --- modules/videos/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/videos/lib.py b/modules/videos/lib.py index ad94dbce..e05cacad 100644 --- a/modules/videos/lib.py +++ b/modules/videos/lib.py @@ -439,7 +439,7 @@ def upsert_video(session: Session, video_path: pathlib.Path, channel: Channel = if channel and not str(video_path).startswith(str(channel.directory.path)): raise ValueError(f'Video path is not within its channel {video_path=} not in {channel.directory=}') - video.channel = channel + video.channel_id = channel.id video.idempotency = idempotency try: