Skip to content

Commit

Permalink
Fix to delete vsx-sync from vlan
Browse files Browse the repository at this point in the history
When is assignin "False" to delete vsx-sync from vlan, the
configuration was not made. This commit fixes this behavior, which
changes the way to validate the existence of the attribute.

AOSANSI 268651

Change-Id: Ieed8ed1d56b4bcd3effb5a2cd74d25eaaebf7427
(cherry picked from commit f846025a3fbde2e6f593423ac2ff58f16bd6013a)
  • Loading branch information
Joss-AG committed Aug 31, 2023
1 parent 03a2be8 commit 52ce744
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyaoscx/vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def update(self):
"""

vlan_data = utils.get_attrs(self, self.config_attrs)
if self.vsx_sync:
if self.vsx_sync is not None:
vlan_data["vsx_sync"] = self.vsx_sync
if hasattr(self, "voice"):
vlan_data["voice"] = self.voice
Expand Down Expand Up @@ -238,7 +238,7 @@ def create(self):

# Get all VLAN data given by the user
vlan_data = utils.get_attrs(self, self.config_attrs)
if self.vsx_sync:
if self.vsx_sync is not None:
vlan_data["vsx_sync"] = self.vsx_sync
if hasattr(self, "voice"):
vlan_data["voice"] = self.voice
Expand Down

0 comments on commit 52ce744

Please sign in to comment.