def handle_tp_data_update(**kwargs): tp = kwargs["instance"] if "object_list" in kwargs: data_updater.get(TranslationProject)( tp, object_list=kwargs["object_list"]).update() else: data_tool.get(TranslationProject)(tp).update()
def test_data_tool_store(store0): assert data_tool.get() is None assert data_tool.get(store0.__class__) is StoreDataTool assert isinstance(store0.data_tool, StoreDataTool) assert store0.data_tool.context is store0
def data_tool(self): return data_tool.get(self.__class__)(self)
def handle_tp_data_update(**kwargs): tp = kwargs["instance"] data_tool.get(TranslationProject)(tp).update()
def handle_store_data_update(**kwargs): store = kwargs["instance"] data_tool.get(Store)(store).update()
def handle_store_data_update(**kwargs): store = kwargs.get("instance") data_tool.get(Store)(store).update()