Browse Source

Bug fixed in fleet association on board update

Change-Id: Ia29a76afe201bddc427eab1546dc9bb177ded04e
Carmelo Romeo 3 months ago
parent
commit
ea836e1cfb
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      iotronic_ui/iot/boards/forms.py

+ 4
- 1
iotronic_ui/iot/boards/forms.py View File

@@ -87,7 +87,8 @@ class UpdateBoardForm(forms.SelfHandlingForm):
87 87
         label=_("Fleets List"),
88 88
         widget=forms.Select(
89 89
             attrs={'class': 'switchable', 'data-slug': 'slug-fleet'}),
90
-        help_text=_("Select fleet in this pool ")
90
+        help_text=_("Select fleet in this pool "),
91
+        required=False
91 92
     )
92 93
 
93 94
     mobile = forms.BooleanField(label=_("Mobile"), required=False)
@@ -162,6 +163,8 @@ class UpdateBoardForm(forms.SelfHandlingForm):
162 163
             #                       {"name": data["name"],
163 164
             #                        "mobile": data["mobile"],
164 165
             #                        "location": data["location"]})
166
+            if data["fleet_list"] == '':
167
+                data["fleet_list"] = None
165 168
 
166 169
             iotronic.board_update(request, data["uuid"],
167 170
                                   {"name": data["name"],

Loading…
Cancel
Save