The problem is that you have compute attribute set at table definition
so web2py tries to use it at every insert and every update. Even if in
your update you is has no knowledge of the previous Alias_ordinal
because you only updating Number_of_posts.
There are two solutions... set db.table.field.c
Ah, ok.
So basically, because the computed field is stored and updated during
writes, it will get re-computed at every input (even if its
dependencies are not changed) and expects its dependencies to be
present in the input (ie, won't read the fields in the DB for missing
values).
I guess I shoul
On Dec 23, 2:04 am, mdipierro wrote:
> I can add a try except so that web2py does not tries to compute fields
> when there is not enough information. The downside is that a typo will
> result in a silent failure to compute. Perhaps we should do this
> anyway.
If you're going to be doing work in t
Need to think about it.
On Dec 23, 3:51 am, cjrh wrote:
> On Dec 23, 2:04 am, mdipierro wrote:
>
> > I can add a try except so that web2py does not tries to compute fields
> > when there is not enough information. The downside is that a typo will
> > result in a silent failure to compute. Perhap
I've thought about the dependencies problem a little bit.
Maybe add some kind of hook so that the user can define the
dependencies of the computed field himself.
If he doesn't define them, the current behavior occurs.
If he defines them, the behavior could be as follow:
1) All the dependencies
For now I have a simple try except. I will see if that you suggest is
possible.
Massimo
On Dec 23, 11:33 am, Magnitus wrote:
> I've thought about the dependencies problem a little bit.
>
> Maybe add some kind of hook so that the user can define the
> dependencies of the computed field himself.
>
6 matches
Mail list logo