Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV import can't add records that relate to another table by anything other than id #13281

Closed
sxsws opened this issue May 13, 2022 · 0 comments
Closed

Comments

@sxsws
Copy link

sxsws commented May 13, 2022

Describe the Bug

e.g. I'm importing a list of countries, which has a relation to continent. In the csv file, if I use the relation value continent.id and use the pk values of the continents, the import works fine. However, if I import by continent.title, the import fails. I have continent.title set up to not allow dupe values. This seems to cause the fail even though it isn't reported because changing the continent.title to something other than an existing record will allow an import of one record.

I guess that only the .id field value is used as a look up, whereas any other field isn't and is attempted to be inserted instead.

To Reproduce

try to import data from a csv file where the relation is using another field other than 'someRelation.id`.

Errors Shown

This file's data structure doesn't match the collection.

Which I've come to figure means lots of different things. No error shown in console.

What version of Directus are you using?

9.10.0

What version of Node.js are you using?

12.22.5

What database are you using?

mariadb

What browser are you using?

firefox

How are you deploying Directus?

local

@sxsws sxsws changed the title CSV import can't relate to foreign keys by anything other than id CSV import can't add records that relate to another table by anything other than id May 13, 2022
@directus directus locked and limited conversation to collaborators May 13, 2022
@rijkvanzanten rijkvanzanten converted this issue into discussion #13286 May 13, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant