Fix CORE API -> Rattail datasync for ProductCost
This commit is contained in:
parent
f61a0a7dd9
commit
67618d4784
2 changed files with 35 additions and 11 deletions
|
@ -108,6 +108,14 @@ class FromCOREAPIToRattail(NewDataSyncImportConsumer):
|
|||
self.process_change(session, self.importers['Product'],
|
||||
host_object=product)
|
||||
|
||||
# sync all ProductCost-related changes
|
||||
types = [
|
||||
'VendorItem',
|
||||
]
|
||||
for change in [c for c in changes if c.payload_type in types]:
|
||||
# normal logic works fine here
|
||||
self.invoke_importer(session, change)
|
||||
|
||||
def get_host_object(self, session, change):
|
||||
if change.payload_type == 'Member':
|
||||
return self.api.get_member(change.payload_key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue