mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-26 06:30:05 +01:00
Do not send empty edit document by function
This commit is contained in:
parent
995394a516
commit
466604725e
@ -1572,6 +1572,10 @@ impl EditDocumentsByFunctionAggregator {
|
||||
pub fn into_event(self, user: &User, event_name: &str) -> Option<Track> {
|
||||
let Self { timestamp, user_agents, index_creation, filtered, with_context } = self;
|
||||
|
||||
// if we had no timestamp it means we never encountered any events and
|
||||
// thus we don't need to send this event.
|
||||
let timestamp = timestamp?;
|
||||
|
||||
let properties = json!({
|
||||
"user-agent": user_agents,
|
||||
"filtered": filtered,
|
||||
@ -1580,7 +1584,7 @@ impl EditDocumentsByFunctionAggregator {
|
||||
});
|
||||
|
||||
Some(Track {
|
||||
timestamp,
|
||||
timestamp: Some(timestamp),
|
||||
user: user.clone(),
|
||||
event: event_name.to_string(),
|
||||
properties,
|
||||
|
Loading…
x
Reference in New Issue
Block a user