Fix profile history to show when a CustomerShopperHistory is deleted

This commit is contained in:
Lance Edgar 2023-08-25 10:41:20 -05:00
parent bc8b5a8d32
commit a40b44b6e3

View file

@ -1307,10 +1307,10 @@ class PersonView(MasterView):
# CustomerShopperHistory (from Shopper perspective)
cls = continuum.version_class(model.CustomerShopperHistory)
standin = continuum.version_class(model.CustomerShopper)
query = self.Session.query(cls)\
.join(model.CustomerShopper,
model.CustomerShopper.uuid == cls.shopper_uuid)\
.filter(model.CustomerShopper.person_uuid == person.uuid)
.join(standin, standin.uuid == cls.shopper_uuid)\
.filter(standin.person_uuid == person.uuid)
versions.extend(query.all())
# PersonNote