mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Fixes #4628 mysql> describe user_vm_details; +---------+-----------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+-----------------+------+-----+---------+----------------+ | id | bigint unsigned | NO | PRI | NULL | auto_increment | | vm_id | bigint unsigned | NO | MUL | NULL | | | name | varchar(255) | NO | | NULL | | | value | varchar(5120) | YES | | NULL | | | display | tinyint(1) | NO | | 1 | | +---------+-----------------+------+-----+---------+----------------+ 5 rows in set (0.00 sec) mysql> describe vm_template_details; +-------------+-----------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+-----------------+------+-----+---------+----------------+ | id | bigint unsigned | NO | PRI | NULL | auto_increment | | template_id | bigint unsigned | NO | MUL | NULL | | | name | varchar(255) | NO | | NULL | | | value | varchar(1024) | NO | | NULL | | | display | tinyint(1) | NO | | 1 | | +-------------+-----------------+------+-----+---------+----------------+ 5 rows in set (0.00 sec) While cloud.user_vm_details allows null values to be added for a detail, cloud.vm_template_details doesn't allow null values. This change filters vm details with null values while creating template from a volume. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>