Hi Massimo,
in sql.py and dal.py
def as_dict(self,datetime_to_str=False):
d = dict(self)
for k in copy.copy(d.keys()):
v=d[k]
if isinstance(v,Row):
d[k]=v.as_dict()
elif isinstance(v,Reference):
d[k]=int(v)
elif isinstance(v, (datetime.date, datetime.datetime,
datetime.time)):
if datetime_to_str:
d[k] = v.isoformat().replace('T',' ')[:19]
elif not isinstance(v,(str,unicode,int,long,float,bool)):
del d[k]
return d
if I understand correctly this code "swallows" NULL datetimes (and
probably other nulls), wouldn't be better to
have the following?
if d[k] is not None: del d[k]
mic