mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-12 23:17:07 +00:00
we are unable to remove all locations from a library
the result of posting this request is nothing to reduce confusion add a check for locations size after removals
This commit is contained in:
parent
d1b190375a
commit
5cf95e53d0
1 changed files with 2 additions and 1 deletions
|
@ -521,7 +521,8 @@ class LibrarySection(PlexObject):
|
|||
locations.remove(_location)
|
||||
else:
|
||||
raise BadRequest('Path: %s does not exist in the library.' % location)
|
||||
|
||||
if len(locations) == 0:
|
||||
raise BadRequest('You are unable to remove all locations from a library.' % location)
|
||||
self.edit(location=locations)
|
||||
|
||||
def get(self, title):
|
||||
|
|
Loading…
Reference in a new issue