webvirtmgr icon indicating copy to clipboard operation
webvirtmgr copied to clipboard

cache_mode missing in form

Open purplesrl opened this issue 8 years ago • 3 comments

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.

purplesrl avatar Jun 13 '16 19:06 purplesrl

@purplesrl Are you going to open a PR?

miguelwhite avatar Jul 14 '16 20:07 miguelwhite

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

xiangjl avatar Aug 03 '16 17:08 xiangjl

See #625

cosu avatar Sep 28 '16 21:09 cosu