2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-27 08:18:25 +00:00

fix: fixed update_app_states call (#1326)

This commit is contained in:
Aradhya Tripathi 2022-06-23 00:10:41 +05:30 committed by GitHub
parent 28549ff139
commit 45267fc897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,15 @@ class AppMeta:
@functools.lru_cache(maxsize=None) @functools.lru_cache(maxsize=None)
class App(AppMeta): class App(AppMeta):
def __init__(self, name: str, branch: str = None, bench: "Bench" = None, soft_link : bool = False, *args, **kwargs): def __init__(
self,
name: str,
branch: str = None,
bench: "Bench" = None,
soft_link: bool = False,
*args,
**kwargs,
):
self.bench = bench self.bench = bench
self.soft_link = soft_link self.soft_link = soft_link
self.required_by = None self.required_by = None
@ -257,9 +265,14 @@ class App(AppMeta):
def update_app_state(self): def update_app_state(self):
from bench.bench import Bench from bench.bench import Bench
bench = Bench(self.bench.name) bench = Bench(self.bench.name)
bench.apps.sync(app_dir=self.app_name, app_name=self.name, bench.apps.sync(
branch=self.tag, required_list=self.local_resolution) app_dir=self.app_name,
app_name=self.name,
branch=self.tag,
required=self.local_resolution,
)