Skip to content

Commit

Permalink
fix: ensure field names defaults to the field of the constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Feb 17, 2025
1 parent f66c743 commit 72170bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/data_layer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ defmodule AshPostgres.DataLayer do
"#{table}_#{identity.name}_index" == constraint
end)

field_names = if identity, do: identity.field_names, else: [field]
field_names = if identity, do: identity.field_names || [field], else: [field]

Enum.map(field_names, fn field_name ->
Ash.Error.Changes.InvalidAttribute.exception(
Expand Down

0 comments on commit 72170bd

Please sign in to comment.