Skip to content

Commit

Permalink
Fix check for modified date
Browse files Browse the repository at this point in the history
This check would produce an error if the modified date was NA. This was highlighted by the additional tests.
  • Loading branch information
Moohan committed Jan 21, 2025
1 parent 93dbef5 commit 36df0e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/add_context.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ add_context <- function(data, id, name, created_date, modified_date) {
# The platform can record the modified date as being before the created date
# by a few microseconds, this will catch any rounding which ensure
# created_date is always <= modified_date
if (modified_date < created_date) {
if (!is.na(modified_date) && modified_date < created_date) {
modified_date <- created_date
}

Expand Down

0 comments on commit 36df0e9

Please sign in to comment.