mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
fix(instances): Refresh ISO list says which pools it could not read
A pool whose refresh failed, one busy with a volume copy for example, was skipped without a word, so a hand-copied image stayed missing with no reason given. The other pools are still refreshed; each failure is shown with libvirt's error. The API comment no longer says listing the ISO images refreshes pools.
This commit is contained in:
parent
d5d054de71
commit
b89672169f
5 changed files with 29 additions and 7 deletions
|
|
@ -12,8 +12,7 @@ class InstanceSerializer(serializers.ModelSerializer):
|
|||
class InstanceDetailsSerializer(serializers.ModelSerializer):
|
||||
def get_fields(self):
|
||||
fields = super().get_fields()
|
||||
# the host's ISO images are a superuser's, as on the VM page; reading
|
||||
# them refreshes every pool of the host
|
||||
# the host's ISO images are a superuser's, as on the VM page
|
||||
request = self.context.get("request")
|
||||
if not (request and request.user.is_superuser):
|
||||
del fields["media_iso"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue