ComposeVolume.public_name: Cache result

main
Felix Stupp 2 years ago
parent 184a00d498
commit 308eb70900
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -280,7 +280,7 @@ class ComposeVolume:
name: VolumeName name: VolumeName
base: ComposeVolumeDef base: ComposeVolumeDef
@property @cached_property
def public_name(self) -> PublicVolumeName: def public_name(self) -> PublicVolumeName:
return self.base.get( return self.base.get(
"name", PublicVolumeName(f"{self.compose.project_name}_{self.name}") "name", PublicVolumeName(f"{self.compose.project_name}_{self.name}")

Loading…
Cancel
Save