-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix preflight exception when file row has no files (#271)
**ISSUE** When importing a CSV without a "files" column, preflight was throwing an exception when trying to upack nil files. **SOLUTION** We don't want to make "files" a required column, because it's totally valid to import a CSV with only Collections. This change detects when `files` in a a row with object type "File" is nil or empty and creates a placeholder error `PFFile` object to store the relevant row-level warnings. **OTHER CHANGES** This commit also splits the Preflight and PreFlightObj tests into two files since the preflight spec file was getting pretty long. see spec/lib/tenejo/pre_flight_obj_spec.rb:26-40 for the new tests.
- Loading branch information
Showing
6 changed files
with
362 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.