[GH-ISSUE #614] cache_mode missing in form #467

Open
opened 2026-02-27 16:39:22 +03:00 by kerem · 3 comments
Owner

Originally created by @purplesrl on GitHub (Jun 13, 2016).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/614

when creating a new instance from a flavor cache_mode is not inserted in the template.html, but it is required in create/forms.py

cache_mode = forms.CharField(error_messages={'required': _('Please select HDD cache mode')})

Since the form.is_valid() function will fail, nothing will be created, it will just silently exit.

To fix this under <input type="hidden" name="hdd_size" value="{{ flavor.disk }}"> in template.html add:

<input type="hidden" name="cache_mode" value="default">
To completely fix this, when the flavor is created cache mode should be added.

Originally created by @purplesrl on GitHub (Jun 13, 2016). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/614 when creating a new instance from a flavor cache_mode is not inserted in the template.html, but it is required in create/forms.py cache_mode = forms.CharField(error_messages={'required': _('Please select HDD cache mode')}) Since the form.is_valid() function will fail, nothing will be created, it will just silently exit. To fix this under `<input type="hidden" name="hdd_size" value="{{ flavor.disk }}">` in template.html add: `<input type="hidden" name="cache_mode" value="default"> ` To completely fix this, when the flavor is created cache mode should be added.
Author
Owner

@miguelwhite commented on GitHub (Jul 14, 2016):

@purplesrl Are you going to open a PR?

<!-- gh-comment-id:232788562 --> @miguelwhite commented on GitHub (Jul 14, 2016): @purplesrl Are you going to open a PR?
Author
Owner

@xiangjl commented on GitHub (Aug 3, 2016):

@miguelwhite @purplesrl I fixed the issue,wait for pull request.

<!-- gh-comment-id:237306846 --> @xiangjl commented on GitHub (Aug 3, 2016): @miguelwhite @purplesrl I fixed the issue,wait for pull request.
Author
Owner

@cosu commented on GitHub (Sep 28, 2016):

See #625

<!-- gh-comment-id:250305152 --> @cosu commented on GitHub (Sep 28, 2016): See #625
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#467
No description provided.