Don't add dupe repos to data on startup (#3671)

This commit is contained in:
Mike Degatano 2022-06-07 12:47:41 -04:00 committed by GitHub
parent 5f9b999a3c
commit b8259471b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,9 +167,12 @@ class StoreManager(CoreSysAttributes, FileConfiguration):
)
# Add Repository to list
self._data[ATTR_REPOSITORIES].append(url)
self.repositories[repository.slug] = repository
self.save_data()
# On start-up we add the saved repos to force a load. But they're already in data
if url not in self._data[ATTR_REPOSITORIES]:
self._data[ATTR_REPOSITORIES].append(url)
self.save_data()
# Persist changes
if persist: