Oleg Broytmann wrote:
> On Tue, Jul 17, 2007 at 10:02:09PM -0700, Andy Grover wrote:
>> Yes indeed.
>> So, add _sig_suppress as an instance variable, initialized to False?
> The simplest solution would be
>>>> + if not self.sqlmeta._creating and not getattr(self.sqlmeta, "_sig_suppress", False):
- if not self.sqlmeta._creating:
+ if not self.sqlmeta._creating and not getattr(self.sqlmeta,
I think we also need this change in _SO_setvalue.
It seems that it is possible to have _SO_setvalue end up calling itself.
This can happen if using a RowUpdateSignal causes setvalue to call set()
(main.py line 1067).
Then, set() will call _SO_setvalue for all columns not in
sqlmeta._PlainSetters (main.py line 1127). This will generate a
duplicate RowUpdateSignal, unless _SO_setvalue also checks
(BTW I am using RowUpdateSignal to create entries in a changelog table,
which is why its important to me to only call the signal once :-)
Thanks -- Regards -- Andy