Skip to content

Commit d2cedc9

Browse files
authored
Merge pull request #226 from mattreaganmozilla/mr/16383
FXIOS-16383 Fix deletion of non-Disconnect records
2 parents 008e6f1 + ddde354 commit d2cedc9

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

publish2rs.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,13 @@ def publish2rs():
5858
to_create.append({"name": name})
5959
elif remote_attachment["hash"] != hash:
6060
to_update.append({"id": remote_attachment["id"], "name": name})
61-
# Remaining records in `remote_attachments` are to be deleted.
62-
to_delete = [{"id": record["id"]} for _, record in remote_attachments.items()]
61+
# Remaining records in `remote_attachments` are to be deleted but only records the
62+
# pipeline manages (disconnect-prefixed).
63+
to_delete = [
64+
{"id": record["id"]}
65+
for name, record in remote_attachments.items()
66+
if name.startswith("disconnect-")
67+
]
6368

6469
# Print changes
6570
print("Changes to apply:")
@@ -98,4 +103,4 @@ def publish2rs():
98103
# Request review.
99104
print("Request review...", end="")
100105
client.request_review(message="r?")
101-
print("✅")
106+
print("✅")

0 commit comments

Comments
 (0)