mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-06 10:16:57 +02:00
Do not render empty children list
This looks awkward for files.
This commit is contained in:
@@ -32,6 +32,9 @@ public class FileObjectDto extends HalRepresentation {
|
||||
}
|
||||
|
||||
public void setChildren(List<FileObjectDto> children) {
|
||||
this.withEmbedded("children", children);
|
||||
if (!children.isEmpty()) {
|
||||
// prevent empty embedded attribute in json
|
||||
this.withEmbedded("children", children);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user