Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Ability to insert default value in case of missing #15

Open
kmonsoor opened this issue Sep 2, 2014 · 2 comments
Open

Comments

@kmonsoor
Copy link
Contributor

kmonsoor commented Sep 2, 2014

In some cases, one of field can be missing as blank. They may have a "de facto" default values, only mentioned when there is an exception.
It would be great, if we could insert default values in case of missing items as like as we are validating an item.
imo, It would greatly pair with "validation" feature.

for example (look at second column):

columns = [
            {'name': 'product_name'},  # Required by default
            {'name': 'product_unit', 'default': 1},
            {'name': 'product_url', 'validator': lambda c: c.startswith('http')}
            # ...
        ]
@santiagobasulto
Copy link
Owner

Good idea.

@jackunion
Copy link

@santiagobasulto if I got everything right, this issue was already fixed, along with a couple of another issues. If it's not a problem, could you close the issues that was already fixed, they are a bit confusing. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants