sst_import_rate fails with settingsnotset error

Issue #1154 resolved
Richard created an issue

sst_import_rate will fail on get_config('TAX', 'MODULE')

The hack/fix is in sst_import_boundry

Add the line,
import tax.config

to the top of the management command module.

Full error output located here,
http://dpaste.com/hold/194683/

Comments (3)

  1. Tay Ray Chuan

    Could you try this patch?

    diff --git a/satchmo/apps/tax/modules/us_sst/config.py b/satchmo/apps/tax/modules/us_sst/config.py
    --- a/satchmo/apps/tax/modules/us_sst/config.py
    +++ b/satchmo/apps/tax/modules/us_sst/config.py
    @@ -1,5 +1,7 @@
     from django.utils.translation import ugettext_lazy as _
    +
     from livesettings import *
    +import tax.config
     
     TAX_MODULE = config_get('TAX', 'MODULE')
     TAX_MODULE.add_choice(('tax.modules.us_sst', _('USA: Streamlined Sales Tax')))
    

    I did the import in us_sst.config.py, instead of us_sst.management.commands.sst_import_rate, as you suggested, since it would make sense to import it just when we need it.

  2. Tay Ray Chuan

    Merge in improvements to tax commands

    This fixes #1154, as well as:

    - add properties on the command implementations to make the tax commands more helpful; - check the arguments, as they require an argument to be passed (the CSV file)

    • rc-pvt/fix-sst_import_rate: tax/us_sst/commands/*: check that <file> is passed tax/us_sst/commands/*: add some info to commands tax/us_sst/config: import config to prevent SettingNotSet error tax/us_sst/commands/sst_import_boundry: strip trailing whitespace

    1a53dcafe73f

  3. Log in to comment