mediastate can be undefined
This commit is contained in:
parent
030563c933
commit
22099d4b9a
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ def edit(data):
|
|||
edited = []
|
||||
for id in ids:
|
||||
item = models.Item.get(id)
|
||||
if item and item.json()['mediastate'] == 'available':
|
||||
if item and item.json().get('mediastate') == 'available':
|
||||
item.edit(data)
|
||||
response = item.json()
|
||||
edited.append(id)
|
||||
|
|
Loading…
Reference in a new issue