From 451ea753a2e928686ad2d2b97458d29bc961df22 Mon Sep 17 00:00:00 2001 From: Clara Dantas Date: Wed, 10 Jun 2020 14:36:53 -0300 Subject: [PATCH] settings_users: Simplify get_item function. --- static/js/settings_users.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/static/js/settings_users.js b/static/js/settings_users.js index 0eb8ac8632..df6fb12474 100644 --- a/static/js/settings_users.js +++ b/static/js/settings_users.js @@ -277,9 +277,7 @@ section.active.create_table = (active_users) => { const $users_table = $("#admin_users_table"); list_render.create($users_table, active_users, { name: "users_table_list", - get_item: (item) => { - return people.get_by_user_id(item); - }, + get_item: people.get_by_user_id, modifier: function (item) { const info = human_info(item); return render_admin_user_list(info); @@ -306,9 +304,7 @@ section.deactivated.create_table = (deactivated_users) => { const $deactivated_users_table = $("#admin_deactivated_users_table"); list_render.create($deactivated_users_table, deactivated_users, { name: "deactivated_users_table_list", - get_item: (item) => { - return people.get_by_user_id(item); - }, + get_item: people.get_by_user_id, modifier: function (item) { const info = human_info(item); return render_admin_user_list(info);