You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I am missing something obvious here, but there does not seem to be a way to import data which contains "empty" foreign key references to a nullable foreign key field?
Here is a screenshot of what I am talking about:
Here the foreign key is to a "part category". An "empty" value in the identifier cannot be mapped to a "null" or "ignore" value. It appears that I am forced to select from an existing "category" - even though the model field in question is nullable.
The text was updated successfully, but these errors were encountered:
This is missing from the current implementation, but it would definitely make sense to add it. The "Ignore this Column" option works by letting the user set the identifier value to "__ignore__", relying on the fact that there is no serializer field with that name. To do the same thing for foreign keys, we could allow the user to map the value to "__null__" and then update data_wizard.tasks.build_row() to replace that with None:
Maybe I am missing something obvious here, but there does not seem to be a way to import data which contains "empty" foreign key references to a nullable foreign key field?
Here is a screenshot of what I am talking about:
Here the foreign key is to a "part category". An "empty" value in the identifier cannot be mapped to a "null" or "ignore" value. It appears that I am forced to select from an existing "category" - even though the model field in question is nullable.
The text was updated successfully, but these errors were encountered: