fix: code not convert to uppercase can't create branch

This commit is contained in:
Methapon Metanipat 2024-08-22 14:18:15 +07:00
parent b0b54451a2
commit 1d68cc2d61

View file

@ -310,10 +310,10 @@ export class BranchController extends Controller {
async (tx) => {
const last = await tx.runningNo.upsert({
where: {
key: `MAIN_BRANCH_${code}`,
key: `MAIN_BRANCH_${code.toLocaleUpperCase()}`,
},
create: {
key: `MAIN_BRANCH_${code}`,
key: `MAIN_BRANCH_${code.toLocaleUpperCase()}`,
value: 1,
},
update: { value: { increment: 1 } },