mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-08 15:04:19 +01:00
db/events: don't add tags to query unless they exist
This commit is contained in:
@@ -43,9 +43,11 @@ function insertEvent(event: Event): Promise<void> {
|
||||
return results;
|
||||
}, []);
|
||||
|
||||
await trx.insertInto('tags')
|
||||
.values(tags)
|
||||
.execute();
|
||||
if (tags.length) {
|
||||
await trx.insertInto('tags')
|
||||
.values(tags)
|
||||
.execute();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user