Make CORE API client via app handler, not deprecated function
This commit is contained in:
parent
7b9b6e57e2
commit
ebdb658a2c
5 changed files with 8 additions and 16 deletions
|
@ -29,7 +29,6 @@ from sqlalchemy import orm
|
|||
from corepos.db.office_op import Session as CoreSession, model as corepos
|
||||
|
||||
from rattail.datasync import DataSyncImportConsumer
|
||||
from rattail_corepos.corepos.api import make_corepos_api
|
||||
|
||||
|
||||
class FromCOREAPIToRattail(DataSyncImportConsumer):
|
||||
|
@ -42,11 +41,11 @@ class FromCOREAPIToRattail(DataSyncImportConsumer):
|
|||
}
|
||||
|
||||
def setup(self):
|
||||
super(FromCOREAPIToRattail, self).setup()
|
||||
super().setup()
|
||||
self.establish_api()
|
||||
|
||||
def establish_api(self):
|
||||
self.api = make_corepos_api(self.config)
|
||||
self.api = self.app.get_corepos_handler().make_webapi()
|
||||
|
||||
def pre_process_changes(self, session, changes):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue