From ea836e1cfb07610a545afe12069ef7b689d8d52c Mon Sep 17 00:00:00 2001 From: Carmelo Romeo Date: Fri, 28 Dec 2018 20:06:53 +0100 Subject: [PATCH] Bug fixed in fleet association on board update Change-Id: Ia29a76afe201bddc427eab1546dc9bb177ded04e --- iotronic_ui/iot/boards/forms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iotronic_ui/iot/boards/forms.py b/iotronic_ui/iot/boards/forms.py index 4e12756..57c4c3b 100644 --- a/iotronic_ui/iot/boards/forms.py +++ b/iotronic_ui/iot/boards/forms.py @@ -87,7 +87,8 @@ class UpdateBoardForm(forms.SelfHandlingForm): label=_("Fleets List"), widget=forms.Select( attrs={'class': 'switchable', 'data-slug': 'slug-fleet'}), - help_text=_("Select fleet in this pool ") + help_text=_("Select fleet in this pool "), + required=False ) mobile = forms.BooleanField(label=_("Mobile"), required=False) @@ -162,6 +163,8 @@ class UpdateBoardForm(forms.SelfHandlingForm): # {"name": data["name"], # "mobile": data["mobile"], # "location": data["location"]}) + if data["fleet_list"] == '': + data["fleet_list"] = None iotronic.board_update(request, data["uuid"], {"name": data["name"],