Skip to content

Commit

Permalink
clean import.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Oct 12, 2024
1 parent 4d36729 commit 08341d0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions kong/db/declarative/import.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ local function workspace_id(schema, options)
return kong.default_workspace
end

if options then
-- options.workspace == null must be handled by caller by querying
-- all available workspaces one by one
if options.workspace == null then
return kong.default_workspace
end
-- options.workspace does not exist
if not options or not options.workspace then
return get_workspace_id()
end

if options.workspace then
return options.workspace
end
-- options.workspace == null must be handled by caller by querying
-- all available workspaces one by one
if options.workspace == null then
return kong.default_workspace
end

return get_workspace_id()
-- options.workspace is a UUID
return options.workspace
end


Expand Down

0 comments on commit 08341d0

Please sign in to comment.