Skip to content

Commit 136dd78

Browse files
committed
Move check up
1 parent 1a8e8eb commit 136dd78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugwise/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,12 +1157,12 @@ def _last_used_schedule(self, loc_id, rule_ids) -> str | None:
11571157
return last_used
11581158

11591159
# Alternatively, find last_used by finding the most recent modified_date
1160-
epoch: dt.datetime = dt.datetime(1970, 1, 1, tzinfo=pytz.utc)
1161-
schemas: dict[str] | None = {}
1162-
11631160
if not rule_ids:
11641161
return # pragma: no cover
11651162

1163+
epoch: dt.datetime = dt.datetime(1970, 1, 1, tzinfo=pytz.utc)
1164+
schemas: dict[str] | None = {}
1165+
11661166
for rule_id in rule_ids:
11671167
schema_name: str = self._domain_objects.find(
11681168
f'rule[@id="{rule_id}"]/name'

0 commit comments

Comments
 (0)