def status(institute_id, case_name): """Update status of a specific case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) status = request.form.get('status', case_obj['status']) link = url_for('.case', institute_id=institute_id, case_name=case_name) if status == 'archive': store.archive_case(institute_obj, case_obj, user_obj, status, link) else: store.update_status(institute_obj, case_obj, user_obj, status, link) return redirect(request.referrer)
def status(institute_id, case_name): """Update status of a specific case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) user_obj = store.user(current_user.email) status = request.form.get('status', case_obj['status']) link = url_for('.case', institute_id=institute_id, case_name=case_name) if status == 'archive': store.archive_case(institute_obj, case_obj, user_obj, status, link) else: store.update_status(institute_obj, case_obj, user_obj, status, link) return redirect(request.referrer)