Skip to content
This repository was archived by the owner on Feb 23, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion multinet/uploaders/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ def upload(
# Perform validation.
validate_csv(rows, key, overwrite)

if key != "_key" and overwrite:
# Once we reach here, we know that the specified key field must be present,
# and either:
# key == "_key" # noqa: E800
# or key != "_key" and the "_key" field is not present
# or key != "_key" and "_key" is present, but overwrite = True
if key != "_key":
rows = set_table_key(rows, key)

# Set the collection, paying attention to whether the data contains
Expand Down