I am trying to compose a pgtrigger.AnyChange with a pgtrigger.Q like this:
class MyTrigger(pgtrigger.Trigger):
# ...
MyTrigger(
# ...
condition=(
pgtrigger.AnyChange('some_field') |
~pgtrigger.Q(old__geometry__poly__equals=pgtrigger.F('new__geometry')))
This fails like this:
TypeError: unsupported operand type(s) for |: 'AnyChange' and 'Q'
I tried to understand what makes the two types incompatible but could not figure it out. Is there a way to build a condition with a combination of AnyChange and Q? If not, would that make sense as a feature request? If yes, any guidance on how to go about it would be welcome.
I am trying to compose a
pgtrigger.AnyChangewith apgtrigger.Qlike this:This fails like this:
I tried to understand what makes the two types incompatible but could not figure it out. Is there a way to build a condition with a combination of
AnyChangeandQ? If not, would that make sense as a feature request? If yes, any guidance on how to go about it would be welcome.