Part 3 of a previous conversation on empty field display after update

11 views
Skip to first unread message

Rick Wherley

unread,
Apr 2, 2022, 2:29:19 AMApr 2
to web2py-users
(The following appends 2 previous posts that are still under review:)

So here's additional info on the empty-field issue I'm having after updating my web2py apps to version 2.22.3. The problem first noticed was that records containing empty fields, in NEW or UPDATED records only, display "None" in the empty fields, when displayed in my views or in appadmin.html. Previously empty fields appeared blank, as is preferred. Existing records still display empty fields as blank.

After examining the data in an SQLite DB browser, I now see that new or edited records have inserted "NULL" in the empty fields, while old records still have blanks. I think I read somewhere that this may be related to Python behavior; my apps are still running on Python 2.7.12.

Another strange behavior I've discovered is that a field containing "NULL" (and displaying as "None") does not evaluate properly in an expression such as:

sppa = db(db.specimen.type_status<>('Test')).select(orderby=db.specimen.id)
return dict(sppa=sppa)

In the above example, since a type_status field containing "NULL" is not equal to "Test", the row should appear in the displayed table---but it does not appear.

Unfortunately, I am stuck and cannot add or edit any records in my apps until I get this sorted. Any help would be greatly appreciated.

For context, see the default app at https://specimens.mantodearesearch.com/

Thanks,
Rick
Reply all
Reply to author
Forward
0 new messages