Closed florianm closed 3 years ago
An SVE photo which didn't get linked to a reconstructed Survey:
drake::loadd("odkc_tf")
drake::loadd("odkc_up")
drake::loadd("wastd_data_min")
att <- "/home/florianm/projects/etlTurtleNesting/media/1606434276689.jpg"
fs::file_exists(att) # attachment file does exist
sm <- odkc_tf$survey_media %>% dplyr::filter(attachment == att)
sm$source_id
wastd_data_min$survey_media %>% dplyr::filter(source_id == sm$source_id)
smup <- odkc_up$survey_media_create %>% dplyr::filter(source_id == sm$source_id)
# survey_source_id is NA = no survey adopted this attachment
Some SVE are not matched to SVS, therefore some survey media will be in "to be created" but the upload will fail gracefully on the missing survey.
Skip uploading existing survey photos