Can only skip a video if it has a channel.

This commit is contained in:
Roland 2021-12-21 08:34:53 -07:00
parent ce2e133066
commit 9fa7a7960d
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -98,7 +98,8 @@ class Video(ModelHelper, Base):
"""
Add this video to it's Channel's skip list.
"""
self.channel.add_video_to_skip_list(self.source_id)
if self.channel:
self.channel.add_video_to_skip_list(self.source_id)
def set_favorite(self, favorite: bool) -> Optional[datetime]:
self.favorite = now() if favorite else None