Esempio n. 1
0
        def apply(data: List[Dict]):
            for view in data:
                if isinstance(view, dict):
                    view = DataView.get_or_create(**view, session=user.session())
            user.session().commit()

            on_finish()
Esempio n. 2
0
    def __init__(self, views):
        self.views = list()

        for view in views:
            if isinstance(view, dict):
                view = DataView.get_or_create(**view)
            self.views.append(view)