Skip to content

Commit 4d259bb

Browse files
committed
return PrintColorModeDefault and PrintColorModeSupported only if required
1 parent 160ec8a commit 4d259bb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SharpIppNextServer/Services/PrinterService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ bool IsRequired(string attributeName)
424424
MediaInfo = "my black color",
425425
MediaOrderCount = 1
426426
},
427-
PrintColorModeDefault = options.PrintColorModes.FirstOrDefault(),
428-
PrintColorModeSupported = options.PrintColorModes
427+
PrintColorModeDefault = !IsRequired(PrinterAttribute.PrintColorModeDefault) ? null : options.PrintColorModes.FirstOrDefault(),
428+
PrintColorModeSupported = !IsRequired(PrinterAttribute.PrintColorModeSupported) ? null : options.PrintColorModes
429429
};
430430
}
431431

0 commit comments

Comments
 (0)