mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-03-06 22:02:34 +08:00
tests: add a check to know if a Value has an uid
This commit is contained in:
parent
24fe6cd205
commit
3b2cd54b9d
@ -34,6 +34,10 @@ impl Value {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn has_uid(&self) -> bool {
|
||||||
|
self["uid"].as_u64().is_some() || self["taskUid"].as_u64().is_some()
|
||||||
|
}
|
||||||
|
|
||||||
/// Return `true` if the `status` field is set to `succeeded`.
|
/// Return `true` if the `status` field is set to `succeeded`.
|
||||||
/// Panic if the `status` field doesn't exists.
|
/// Panic if the `status` field doesn't exists.
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user