Changeset 6dbf7cf in rattail-corepos


Ignore:
Timestamp:
07/30/2020 09:07:39 PM (3 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
de628b3
Parents:
1fe48d9
Message:

Use custom data model where possible, when importing from CORE API

not sure if this really does much good, but what the heck

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rattail_corepos/importing/corepos/api.py

    r1fe48d9 r6dbf7cf  
    3535
    3636from rattail import importing
    37 from rattail.db import model
    3837from rattail.gpc import GPC
    3938from rattail.util import OrderedDict
     
    220219            return self.customers.get(id)
    221220
     221        model = self.config.get_model()
    222222        try:
    223223            return self.session.query(model.Customer)\
     
    306306            return self.customers.get(account_id)
    307307
     308        model = self.config.get_model()
    308309        try:
    309310            return self.session.query(model.Customer)\
     
    555556    def setup(self):
    556557        super(MemberImporter, self).setup()
     558        model = self.config.get_model()
    557559        self.customers = self.cache_model(model.Customer, key='number')
    558560
     
    564566            return self.customers.get(number)
    565567
     568        model = self.config.get_model()
    566569        try:
    567570            return self.session.query(model.Customer)\
Note: See TracChangeset for help on using the changeset viewer.