File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,12 @@ def _get_locations(self) -> None:
229229 for location in locations :
230230 loc .loc_id = location .attrib ["id" ]
231231 loc .name = location .find ("name" ).text
232+ if loc .name == "Home" :
233+ self ._home_loc_id = loc .loc_id
234+ self ._home_location = self ._domain_objects .find (
235+ f"./location[@id='{ loc .loc_id } ']"
236+ )
237+
232238 self ._new_locations .append (loc .loc_id )
233239 if (
234240 loc .loc_id in self ._existing_locations
@@ -242,13 +248,6 @@ def _get_locations(self) -> None:
242248 "primary_prio" : 0 ,
243249 "secondary" : [],
244250 }
245- if loc .name != "Home" :
246- continue
247-
248- self ._home_loc_id = loc .loc_id
249- self ._home_location = self ._domain_objects .find (
250- f"./location[@id='{ loc .loc_id } ']"
251- )
252251
253252 removed = list (set (self ._existing_locations ) - set (self ._new_locations ))
254253 if self ._existing_locations and removed :
You can’t perform that action at this time.
0 commit comments