john-bodley edited a comment on issue #7723: [CSV Upload] Fix Index Column 
input filter
URL: 
https://github.com/apache/incubator-superset/pull/7723#issuecomment-502884748
 
 
   @etr2460 I'm not really sure what purpose these filters serve (especially 
for the case were a validator is present) and when values which evaluate to 
`False` should be `None`. Additionally it seems, 
   
   ```
   decimal = StringField(
        _('Decimal Character'),
        description=_('Character to interpret as decimal point.'),
        validators=[Optional()],
        widget=BS3TextFieldWidget(),
        filters=[lambda x: x or '.'],
   )
   ```
   
   is somewhat magical as it uses `.` by default (without indicating this to 
the user) could be defined as, 
   
   ```
   decimal = StringField(
        _('Decimal Character'),
        description=_('Character to interpret as decimal point.'),
        default='.',
        validators=[Optional(), Length(min=1, max=1)],
        widget=BS3TextFieldWidget(),
   )
   ```
   
     

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to