mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
return the same time in case we didn't found a created or updated at
This commit is contained in:
parent
180511795b
commit
bef81065f9
@ -182,11 +182,13 @@ impl V4IndexReader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let current_time = OffsetDateTime::now_utc();
|
||||||
|
|
||||||
let metadata = IndexMetadata {
|
let metadata = IndexMetadata {
|
||||||
uid: name,
|
uid: name,
|
||||||
primary_key: meta.primary_key,
|
primary_key: meta.primary_key,
|
||||||
created_at: created_at.unwrap_or_else(OffsetDateTime::now_utc),
|
created_at: created_at.unwrap_or(current_time),
|
||||||
updated_at: updated_at.unwrap_or_else(OffsetDateTime::now_utc),
|
updated_at: updated_at.unwrap_or(current_time),
|
||||||
};
|
};
|
||||||
|
|
||||||
let ret = V4IndexReader {
|
let ret = V4IndexReader {
|
||||||
|
Loading…
Reference in New Issue
Block a user