Change in empty field display after upgrade

瀏覽次數:11 次
跳到第一則未讀訊息

Rick Wherley

未讀,
2022年4月2日 凌晨2:29:192022/4/2
收件者:web2py-users
After finally upgrading my web2py apps to version 2.22.3 (from a very old 2016 version) I've discovered a change in how the DAL is dealing with empty data fields. Previously empty fields displayed as blank in table views. Now, they still appear blank, EXCEPT in NEW or UPDATED records, in which all blank fields now display "None" in table views. This is true of my views as well as appadmin.html.

When viewing the record in forms, the empty fields are still blank, so I assume this is just an issue of how DAL retrieves data. I have scoured the forum and the book, but have not found a specific reference to what needs to be fixed, and where--in the db definition, default.py defs, or in views? 

For further clarification, my db is SQLITE and my fields are defined with only name and type (string) attributes, so all other attributes have default settings. I have tried messing with adding attributes such as "required=False" or "default=''' ", both in db.define_table and in db.table.field.extra = {}, to no avail. I am definitely over my head here.

This is an expanded version of a post I made yesterday that never appeared, so if there is post-vetting purgatory or something I apologize for the repost.

Thanks in advance for any suggestions.
Rick
回覆所有人
回覆作者
轉寄
0 則新訊息