mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Fixed handling of empty created_at dates in member CSV imorts
no issue - When created_at value is not provided it should be treated as an empty one instead of trying to import empty string. - This scenario happens when the column is defined in CSV but no values are present (default parsed value is empty string '')
This commit is contained in:
parent
52ccd4648f
commit
53b6ad16d8
2 changed files with 4 additions and 4 deletions
|
@ -364,7 +364,7 @@ const members = {
|
|||
stripe_customer_id: entry.stripe_customer_id,
|
||||
comped: (String(entry.complimentary_plan).toLocaleLowerCase() === 'true'),
|
||||
labels: entryLabels,
|
||||
created_at: entry.created_at
|
||||
created_at: entry.created_at === '' ? undefined : entry.created_at
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
email,name,subscribed_to_emails
|
||||
jbloggs@example.com,joe,true
|
||||
test@example.com,test,false
|
||||
email,name,subscribed_to_emails,created_at
|
||||
jbloggs@example.com,joe,true,
|
||||
test@example.com,test,false,"1991-10-02T20:30:31.000Z"
|
||||
|
|
|
Loading…
Reference in a new issue