filter less than 3 dimensions

This commit is contained in:
Aleksandr Trushkin
2024-02-23 14:55:02 +03:00
parent 4563a3bede
commit fd29ef6ff8
6 changed files with 53 additions and 14 deletions

View File

@ -144,7 +144,7 @@ func (h exportHandlers) YMLCatalog(ctx context.Context, cmd *cli.Command) error
switch {
case addToSkip(item.Description == "", reasonNoDescription, sublog):
continue
case addToSkip(item.Sizes == (entity.GoodsItemSize{}), reasonNoSize, sublog):
case addToSkip(!item.Sizes.AllSizesSet(), reasonNoSize, sublog):
continue
case addToSkip(item.Sizes.GetSum(entity.DimensionKindCentimeter) > maximumAllowedSizes, reasonTooLarge, sublog):
continue