fix: Cloudflash now supports full-wipe before flashing
This commit is contained in:
@@ -390,9 +390,9 @@ def delete_firmware(doc_id: str) -> None:
|
||||
db.collection(COLLECTION)
|
||||
.where("hw_type", "==", hw_type)
|
||||
.where("channel", "==", channel)
|
||||
.order_by("uploaded_at", direction="DESCENDING")
|
||||
.limit(1)
|
||||
.stream()
|
||||
)
|
||||
if remaining:
|
||||
# Sort in Python to avoid needing a composite Firestore index
|
||||
remaining.sort(key=lambda d: d.to_dict().get("uploaded_at", ""), reverse=True)
|
||||
remaining[0].reference.update({"is_latest": True})
|
||||
|
||||
Reference in New Issue
Block a user