Skip to content

Commit 324e518

Browse files
committed
protect crud.select
1 parent 5222198 commit 324e518

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crud/select.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ local checks = require('checks')
22
local errors = require('errors')
33
local vshard = require('vshard')
44

5-
local call = require('crud.common.call')
65
local utils = require('crud.common.utils')
76
local dev_checks = require('crud.common.dev_checks')
87

@@ -213,7 +212,7 @@ function select_module.pairs(space_name, user_conditions, opts)
213212
return gen
214213
end
215214

216-
function select_module.call(space_name, user_conditions, opts)
215+
local function select_module_call_xc(space_name, user_conditions, opts)
217216
checks('string', '?table', {
218217
after = '?table',
219218
first = '?number',
@@ -263,4 +262,8 @@ function select_module.call(space_name, user_conditions, opts)
263262
}
264263
end
265264

265+
function select_module.call(space_name, user_conditions, opts)
266+
return SelectError:pcall(select_module_call_xc, space_name, user_conditions, opts)
267+
end
268+
266269
return select_module

0 commit comments

Comments
 (0)