git_deploy: fix initialization regression
New repos have not yet saved the valid state, so it is necessary to provide a default value when attempting to access the "is_valid" field. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
119f579a44
commit
90e13c07f7
|
@ -48,7 +48,7 @@ class GitDeploy(AppDeploy):
|
||||||
async def initialize(self) -> Dict[str, Any]:
|
async def initialize(self) -> Dict[str, Any]:
|
||||||
storage = await super().initialize()
|
storage = await super().initialize()
|
||||||
await self.repo.restore_state(storage)
|
await self.repo.restore_state(storage)
|
||||||
self._is_valid = storage["is_valid"]
|
self._is_valid = storage.get("is_valid", self.repo.is_valid())
|
||||||
if not self.needs_refresh():
|
if not self.needs_refresh():
|
||||||
self.repo.log_repo_info()
|
self.repo.log_repo_info()
|
||||||
return storage
|
return storage
|
||||||
|
|
Loading…
Reference in New Issue