Skip to content

Commit

Permalink
Fix bug that makes tooling emit multiple references blocks if more th…
Browse files Browse the repository at this point in the history
…an one fk present
  • Loading branch information
olivermt committed Dec 15, 2024
1 parent 06883fa commit e6f788a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/resource_generator/resource_generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -385,18 +385,18 @@ defmodule AshPostgres.ResourceGenerator do
[]
end
end
|> Enum.join("\n")
|> String.trim()
|> then(
&[
"""
references do
#{&1}
end
"""
]
)
end)
|> Enum.join("\n")
|> String.trim()
|> then(
&[
"""
references do
#{&1}
end
"""
]
)
end

defp add_match_with(str, empty) when empty in [[], nil], do: str
Expand Down

0 comments on commit e6f788a

Please sign in to comment.