Skip to content

Commit

Permalink
[CE-216] Fix host can not delete in admin dashboard
Browse files Browse the repository at this point in the history
Directly get host type through host model object

Change-Id: Ia39fb70361284ffd051994185737910377f5447b
Signed-off-by: Haitao Yue <hightall@me.com>
  • Loading branch information
hightall committed Jan 10, 2018
1 parent fc5418f commit 8524352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def delete(self, id):
logger.warning("Cannot delete non-existed host")
return False

host_type = h.host.type
host_type = h.type

if ClusterModel.objects(host=h).count():
logger.warning("Host type not found.")
Expand Down

0 comments on commit 8524352

Please sign in to comment.