Fix profile history to show when a CustomerShopperHistory is deleted
This commit is contained in:
parent
a40b44b6e3
commit
844c629a6a
|
@ -1292,10 +1292,10 @@ class PersonView(MasterView):
|
||||||
|
|
||||||
# CustomerShopperHistory (from Customer perspective)
|
# CustomerShopperHistory (from Customer perspective)
|
||||||
cls = continuum.version_class(model.CustomerShopperHistory)
|
cls = continuum.version_class(model.CustomerShopperHistory)
|
||||||
|
standin = continuum.version_class(model.CustomerShopper)
|
||||||
query = self.Session.query(cls)\
|
query = self.Session.query(cls)\
|
||||||
.join(model.CustomerShopper,
|
.join(standin, standin.uuid == cls.shopper_uuid)\
|
||||||
model.CustomerShopper.uuid == cls.shopper_uuid)\
|
.join(model.Customer, model.Customer.uuid == standin.customer_uuid)\
|
||||||
.join(model.Customer)\
|
|
||||||
.filter(model.Customer.account_holder_uuid == person.uuid)
|
.filter(model.Customer.account_holder_uuid == person.uuid)
|
||||||
versions.extend(query.all())
|
versions.extend(query.all())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue