Hi,
When I try to assign a Field instance as a value in a Storage object, it
fails by simply not assigning anything (and in fact removing the key if it
was already present).
x = Storage()
x.any = (any Field instance)
print x ... <Storage {}>
In summary, it treats Field instances as None because of the condition [ if
value == None ] used in Storage.__setattr__, which (incorrectly) causes a
Query object to be created, thus causing the condition to be incorrectly
evaluated to True.
The fix is to use [ if value *is None* ] instead of [ if value == None ].
In fact, I recommend to use [ is None / is not None ] everywhere instead
of [ == / != None ], precisely to avoid these kind of problems.
Thanks,
Carlos