File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -205,16 +205,23 @@ def _get_groups(self) -> None:
205205 for group in self ._domain_objects .findall ("./group" ):
206206 members : list [str ] = []
207207 group_id = group .get ("id" )
208+ group_name = group .find ("name" ).text
209+ if group_id is None :
210+ continue # pragma: no cover
211+
208212 self ._new_groups .append (group_id )
209- if group_id in self ._existing_groups :
213+ if (
214+ group_id in self ._existing_groups
215+ and self .gw_entities [group_id ]["name" ] == group_name
216+ ):
210217 continue
211- group_name = group . find ( "name" ). text
218+
212219 group_type = group .find ("type" ).text
213220 group_appliances = group .findall ("appliances/appliance" )
214221 for item in group_appliances :
215222 self ._add_member (item , members )
216223
217- if group_type in GROUP_TYPES and members and group_id :
224+ if group_type in GROUP_TYPES and members :
218225 self .gw_entities [group_id ] = {
219226 "dev_class" : group_type ,
220227 "model" : "Group" ,
You can’t perform that action at this time.
0 commit comments