Merge pull request #1961 from ogayot/lvm-size-max

storage: fix UI crash when partition size gets capped
This commit is contained in:
Olivier Gayot 2024-04-09 16:58:06 +02:00 committed by GitHub
commit 6db2ff8113
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -117,8 +117,8 @@ class SizeWidget(StringEditor):
) )
) )
# This will invoke self.form.clean_size() and it is expected that # This will invoke self.form.clean_size() and it is expected that
# size_str (and therefore self.value) are propertly aligned. # size_str (and therefore self.value) are properly aligned.
self.accurate_value = self.form.size self.accurate_value = self.form.size.value
else: else:
aligned_sz = align_up(sz, self.form.alignment) aligned_sz = align_up(sz, self.form.alignment)
aligned_sz_str = humanize_size(aligned_sz) aligned_sz_str = humanize_size(aligned_sz)