Browse files

Fix if no evistype is set that is return the complete list

  • Loading branch information...
1 parent 2ac8d82 commit 06fbca48c762e0673c5d79b61115de206d4bfb1c @Azd325 Azd325 committed Feb 5, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 cmsplugin_eviscape/views.py
View
6 cmsplugin_eviscape/views.py
@@ -21,5 +21,9 @@ def get_sent_evis(server, nod_id, limit, evis_type):
data = data.strip('()')
data = json.loads(data)
- sent_evis = [e for e in data['objects'] if e['evis']['typ_value'] == evis_type]
+ # Check if a evis_type is set and filter the results for it
+ if evis_type:
+ sent_evis = [e for e in data['objects'] if e['evis']['typ_value'] == evis_type]
+ else:
+ sent_evis = [e for e in data['objects']]
return sent_evis

0 comments on commit 06fbca4

Please sign in to comment.