Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazib Hussain committed Nov 9, 2023
1 parent 8a36c67 commit 58623f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/loot-core/src/server/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,14 @@ export async function insertCategory(
let id_;
await batchMessages(async () => {
// Dont allow duplicated names in groups
const existingCatInGroup = await first( `SELECT id FROM categories WHERE cat_group = ? and name = ? LIMIT 1`, [category.cat_group, category.name]);
const existingCatInGroup = await first(
`SELECT id FROM categories WHERE cat_group = ? and name = ? LIMIT 1`,
[category.cat_group, category.name],
);
if (existingCatInGroup) {
throw new Error(`Category '${category.name}' already exists in group '${category.cat_group}'`);
throw new Error(
`Category ‘${category.name}’ already exists in group ‘${category.cat_group}’`,
);
}

if (atEnd) {
Expand Down

0 comments on commit 58623f8

Please sign in to comment.