| @@ 513-522 (lines=10) @@ | ||
| 510 | "part_id": part_id, |
|
| 511 | }) |
|
| 512 | ||
| 513 | if keep_inactive: |
|
| 514 | # keep inactive services so they come up again when reactivated |
|
| 515 | uids = [record.get("uid") for record in records] |
|
| 516 | for record in self.getRawServices(): |
|
| 517 | uid = record.get("uid") |
|
| 518 | if uid in uids: |
|
| 519 | continue |
|
| 520 | obj = api.get_object(uid) |
|
| 521 | if not api.is_active(obj): |
|
| 522 | records.append(record) |
|
| 523 | ||
| 524 | mutator = self.mutator("services") |
|
| 525 | mutator(self, records) |
|
| @@ 301-310 (lines=10) @@ | ||
| 298 | "Expected object, uid or record, got %r" % type(v)) |
|
| 299 | records.append({"uid": uid, "hidden": hidden}) |
|
| 300 | ||
| 301 | if keep_inactive: |
|
| 302 | # keep inactive services so they come up again when reactivated |
|
| 303 | uids = [record.get("uid") for record in records] |
|
| 304 | for record in self.getRawServices(): |
|
| 305 | uid = record.get("uid") |
|
| 306 | if uid in uids: |
|
| 307 | continue |
|
| 308 | obj = api.get_object(uid) |
|
| 309 | if not api.is_active(obj): |
|
| 310 | records.append(record) |
|
| 311 | ||
| 312 | mutator = self.mutator("services") |
|
| 313 | mutator(self, records) |
|