mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01: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