mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
fix: use attribute.name if attribute.source is nil
This commit is contained in:
parent
2b32f916b3
commit
71ddb28332
1 changed files with 1 additions and 1 deletions
|
@ -1892,7 +1892,7 @@ defmodule AshPostgres.MigrationGenerator do
|
||||||
if attribute.source == source_field_name && relationship.type == :belongs_to &&
|
if attribute.source == source_field_name && relationship.type == :belongs_to &&
|
||||||
foreign_key?(relationship) do
|
foreign_key?(relationship) do
|
||||||
configured_reference =
|
configured_reference =
|
||||||
configured_reference(resource, table, attribute.source, relationship)
|
configured_reference(resource, table, attribute.source || attribute.name, relationship)
|
||||||
|
|
||||||
unless Map.get(configured_reference, :ignore?) do
|
unless Map.get(configured_reference, :ignore?) do
|
||||||
destination_field_source =
|
destination_field_source =
|
||||||
|
|
Loading…
Reference in a new issue