fix: uncloud daemon crash when listing partially replicated container records

This commit is contained in:
Pasha Sviderski
2025-12-18 16:32:26 +10:00
parent 5acf557675
commit d2a7af744d
3 changed files with 78 additions and 12 deletions
+4
View File
@@ -135,6 +135,10 @@ func (c *Container) UnmarshalJSON(data []byte) error {
}
*c = Container(temp)
if c.ContainerJSONBase == nil {
return fmt.Errorf("container data is missing mandatory base fields: %s", data)
}
c.Name = strings.TrimPrefix(c.Name, "/")
return nil