Methanal.View.IntegerInput discards a valid value of 0 when an embedded label is provided for the field

Bug #734916 reported by Forrest Aldridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Methanal
Fix Released
Medium
Jonathan Jacobs

Bug Description

The method Methanal.View.TextInput._needsLabel replaces valid values of 0 with the embedded label for the input if provided, because it only tests whether the raw value evaluates to false in a boolean context.

The attached patch first converts the value to a string if it is not null and then checks whether the string has a length of 0.

Revision history for this message
Forrest Aldridge (forrest-aldridge) wrote :
Changed in methanal:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Jonathan Jacobs (jjacobs)
milestone: none → 0.2.2
Changed in methanal:
status: Triaged → Fix Committed
Changed in methanal:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.