fix: error when workflow id empty
This commit is contained in:
parent
b1a1a83051
commit
09903c6acb
1 changed files with 4 additions and 0 deletions
|
|
@ -277,6 +277,8 @@ export class ServiceController extends Controller {
|
|||
async createService(@Request() req: RequestWithUser, @Body() body: ServiceCreate) {
|
||||
const { work, productGroupId, ...payload } = body;
|
||||
|
||||
if (!payload.workflowId) payload.workflowId = undefined;
|
||||
|
||||
const [productGroup] = await prisma.$transaction([
|
||||
prisma.productGroup.findFirst({
|
||||
include: {
|
||||
|
|
@ -380,6 +382,8 @@ export class ServiceController extends Controller {
|
|||
|
||||
const { work, productGroupId, ...payload } = body;
|
||||
|
||||
if (!payload.workflowId && payload.workflowId !== undefined) payload.workflowId = undefined;
|
||||
|
||||
const [productGroup] = await prisma.$transaction([
|
||||
prisma.productGroup.findFirst({
|
||||
include: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue