We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fc2848 commit 632a95dCopy full SHA for 632a95d
lib/ash_admin/resource/resource.ex
@@ -276,15 +276,19 @@ defmodule AshAdmin.Resource do
276
|> Enum.filter(&(&1.destination == resource))
277
|> Enum.map(& &1.context[:data_layer][:table])
278
|> Enum.uniq()
279
- |> then(
280
- &Enum.concat(
281
- [
282
- Spark.Dsl.Extension.get_opt(resource, [:postgres], :table),
283
- Spark.Dsl.Extension.get_opt(resource, [:sqlite], :table)
284
- ],
285
- &1
286
- )
287
+ |> case do
+ [] ->
+ []
+
+ tables ->
+ Enum.concat(
+ [
+ Spark.Dsl.Extension.get_opt(resource, [:postgres], :table),
+ Spark.Dsl.Extension.get_opt(resource, [:sqlite], :table)
288
+ ],
289
+ tables
290
+ )
291
+ end
292
|> Enum.reject(&is_nil/1)
293
end
294
0 commit comments