From b378ecd3f04cf873e604bd33e262311ddf741a75 Mon Sep 17 00:00:00 2001 From: Suleiman Dibirov Date: Wed, 27 Nov 2024 11:19:51 +0200 Subject: [PATCH] fixed project.go Signed-off-by: Suleiman Dibirov --- types/project.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/project.go b/types/project.go index 9b8d75c6..813f2d1f 100644 --- a/types/project.go +++ b/types/project.go @@ -657,7 +657,11 @@ func (p Project) WithServicesLabelsResolved(discardLabelFiles bool) (*Project, e } labels = labels.OverrideBy(service.Labels.ToMappingWithEquals()) - service.Labels = NewLabelsFromMappingWithEquals(labels) + if len(labels) == 0 { + labels = nil + } else { + service.Labels = NewLabelsFromMappingWithEquals(labels) + } if discardLabelFiles { service.LabelFiles = nil