Pass raise_for_missing=True to worms.

This commit is contained in:
voussoir 2021-11-10 23:04:49 -08:00
parent 424113f061
commit 5076efac45
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -81,6 +81,9 @@ class YCDLDBChannelMixin:
def get_channels(self):
return self.get_objects(objects.Channel)
def get_channels_by_id(self, channel_ids):
return self.get_objects_by_id(objects.Channel, channel_ids, raise_for_missing=True)
def get_channels_by_sql(self, query, bindings=None):
return self.get_objects_by_sql(objects.Channel, query, bindings)
@ -247,7 +250,7 @@ class YCDLDBVideoMixin:
return self.get_object_by_id(objects.Video, video_id)
def get_videos_by_id(self, video_ids):
return self.get_objects_by_id(objects.Video, video_ids)
return self.get_objects_by_id(objects.Video, video_ids, raise_for_missing=True)
def get_videos(self, channel_id=None, *, state=None, orderby=None):
wheres = []