mirror of
https://github.com/resf/distro-tools.git
synced 2024-12-01 09:26:26 +00:00
Prevent duplicates in updateinfo collection
This commit is contained in:
parent
c72684f08c
commit
81f5961d80
@ -207,7 +207,8 @@ async def get_updateinfo(
|
|||||||
"module_version": pkg.module_version,
|
"module_version": pkg.module_version,
|
||||||
}
|
}
|
||||||
no_default_collection = True
|
no_default_collection = True
|
||||||
collections[collection_short]["packages"].append(pkg)
|
if pkg not in collections[collection_short]["packages"]:
|
||||||
|
collections[collection_short]["packages"].append(pkg)
|
||||||
else:
|
else:
|
||||||
if no_default_collection:
|
if no_default_collection:
|
||||||
continue
|
continue
|
||||||
@ -215,7 +216,10 @@ async def get_updateinfo(
|
|||||||
collections[default_collection_short] = {
|
collections[default_collection_short] = {
|
||||||
"packages": [],
|
"packages": [],
|
||||||
}
|
}
|
||||||
collections[default_collection_short]["packages"].append(pkg)
|
if pkg not in collections[default_collection_short]["packages"]:
|
||||||
|
collections[default_collection_short]["packages"].append(
|
||||||
|
pkg
|
||||||
|
)
|
||||||
|
|
||||||
if no_default_collection and default_collection_short in collections:
|
if no_default_collection and default_collection_short in collections:
|
||||||
del collections[default_collection_short]
|
del collections[default_collection_short]
|
||||||
|
Loading…
Reference in New Issue
Block a user