remove debugging catch
This commit is contained in:
parent
b181f15d11
commit
679d1429f3
|
@ -42,12 +42,8 @@ def filter_viewings(viewings, pivot_field, remove_duplicates=True):
|
||||||
for viewing in viewings:
|
for viewing in viewings:
|
||||||
viewing_field = viewing[pivot_field]
|
viewing_field = viewing[pivot_field]
|
||||||
if viewing_field in viewings_filtered.keys():
|
if viewing_field in viewings_filtered.keys():
|
||||||
try:
|
|
||||||
if not remove_duplicates or (remove_duplicates and not any(x['imdb_id'] == viewing['imdb_id'] for x in viewings_filtered[viewing_field])):
|
if not remove_duplicates or (remove_duplicates and not any(x['imdb_id'] == viewing['imdb_id'] for x in viewings_filtered[viewing_field])):
|
||||||
viewings_filtered[viewing_field] += [viewing]
|
viewings_filtered[viewing_field] += [viewing]
|
||||||
except KeyError as e:
|
|
||||||
print(e)
|
|
||||||
print(viewing)
|
|
||||||
else:
|
else:
|
||||||
viewings_filtered[viewing[pivot_field]] = [viewing]
|
viewings_filtered[viewing[pivot_field]] = [viewing]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue