Validate empty items explicitly (#1216)

This commit is contained in:
JonnyWong16 2023-08-27 13:18:03 -07:00 committed by GitHub
parent ea4885acf7
commit 80fd90b687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1684,7 +1684,7 @@ class LibrarySection(PlexObject):
def _validateItems(self, items):
""" Validates the specified items are from this library and of the same type. """
if not items:
if items is None or items == []:
raise BadRequest('No items specified.')
if not isinstance(items, list):