Fix profile history to show when a CustomerShopperHistory is deleted
This commit is contained in:
parent
bc8b5a8d32
commit
a40b44b6e3
|
@ -1307,10 +1307,10 @@ class PersonView(MasterView):
|
||||||
|
|
||||||
# CustomerShopperHistory (from Shopper perspective)
|
# CustomerShopperHistory (from Shopper 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)\
|
.filter(standin.person_uuid == person.uuid)
|
||||||
.filter(model.CustomerShopper.person_uuid == person.uuid)
|
|
||||||
versions.extend(query.all())
|
versions.extend(query.all())
|
||||||
|
|
||||||
# PersonNote
|
# PersonNote
|
||||||
|
|
Loading…
Reference in a new issue