Skip to content

Conversation

@gpkvt
Copy link
Contributor

@gpkvt gpkvt commented Sep 9, 2024

No description provided.

@gpkvt gpkvt requested a review from pajowu September 9, 2024 08:48
}
elif "first_name" in headers and "last_name" in headers:
csv_format = {
"name": "combine",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of storing different things in name: both a column name and a magic constant which implies that two columns should be combined. I suggest to instead return a list of fields here and checking in import_csv whether a list was returned (isinstance(row['name'], list))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To simplify this could also always return a list for name, which for the other cases only contains a single entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants