Commit 3c93c110f77785c8733a585f9791d9ded1213cce

Authored by Tomasz Bartosiak
1 parent 12fef7ce

Corrected argument name in frame status manipulation; corrected single element -…

…> list of ints conversion
Showing 1 changed file with 10 additions and 4 deletions
semantics/views.py
... ... @@ -769,21 +769,27 @@ def ajax_prepare_cluster(request, unifier_frame_id, system):
769 769 return response
770 770  
771 771 @ajax(method='get', encode_result=True)
772   -def ajax_change_frame_statuses_free(request, frame_ids, system):
  772 +def ajax_change_frame_statuses_free(request, unifier_frame_ids, system):
773 773 # if not request.user.is_authenticated():
774 774 # return {'status': 'not logged in'}
775 775 if system == 'valUnifier':
776   - status = change_frames_statuses([int(fid) for fid in frame_ids.split(',')], [], system)
  776 + if type(unifier_frame_ids) is int:
  777 + status = change_frames_statuses([unifier_frame_ids], [], system)
  778 + else:
  779 + status = change_frames_statuses([int(fid) for fid in unifier_frame_ids.split(',')], [], system)
777 780 else:
778 781 status = 'ok'
779 782 return {'status': status}
780 783  
781 784 @ajax(method='get', encode_result=True)
782   -def ajax_change_frame_statuses_take(request, frame_ids, system):
  785 +def ajax_change_frame_statuses_take(request, unifier_frame_ids, system):
783 786 # if not request.user.is_authenticated():
784 787 # return {'status': 'not logged in'}
785 788 if system == 'valUnifier':
786   - status = change_frames_statuses([], [int(fid) for fid in frame_ids.split(',')], system)
  789 + if type(unifier_frame_ids) is int:
  790 + status = change_frames_statuses([], [unifier_frame_ids], system)
  791 + else:
  792 + status = change_frames_statuses([], [int(fid) for fid in unifier_frame_ids.split(',')], system)
787 793 else:
788 794 status = 'ok'
789 795 return {'status': status}
... ...