From 2a37bb5a49493de22cab256cfad8e37f6673315a Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 23 Jul 2019 19:44:32 -0500 Subject: [PATCH] Cleanup attribute names for CORE Department model --- rattail_corepos/datasync/corepos.py | 2 +- rattail_corepos/importing/corepos.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rattail_corepos/datasync/corepos.py b/rattail_corepos/datasync/corepos.py index 91db072..a2adc58 100644 --- a/rattail_corepos/datasync/corepos.py +++ b/rattail_corepos/datasync/corepos.py @@ -56,7 +56,7 @@ class COREPOSProductWatcher(DataSyncWatcher): (None, model.DataSyncChange( payload_type='Department', - payload_key=six.text_type(dept.dept_no))) + payload_key=six.text_type(dept.number))) for dept in departments]) # TODO: subdepartment table doesn't have a modified flag? diff --git a/rattail_corepos/importing/corepos.py b/rattail_corepos/importing/corepos.py index 743918e..b2e4f92 100644 --- a/rattail_corepos/importing/corepos.py +++ b/rattail_corepos/importing/corepos.py @@ -112,8 +112,8 @@ class DepartmentImporter(FromCOREPOS, importing.model.DepartmentImporter): def normalize_host_object(self, department): return { - 'number': department.dept_no, - 'name': department.dept_name, + 'number': department.number, + 'name': department.name, }