Setting channel id rather than channel because the channel may be in a different session.

This commit is contained in:
Roland 2022-01-16 10:27:24 -07:00
parent 89e3edb157
commit 1d9fe2f649
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -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: