byrokrat / giroapp

Command line app for managing autogiro donations.
GNU General Public License v3.0
4 stars 2 forks source link

error while writing to settings.json #11

Closed hanneskod closed 7 years ago

hanneskod commented 7 years ago

Encountered an error in the database handling. After a fresh install and running

bin/giroapp init --org-name=q --bgc-customer-number=q --bankgiro=q -n

Then settings.json looks like

[
    {
        "key": "org_name",
        "value": "q"
    },
    {
        "key": "bgc_customer_number",
        "value": "q"
    },
    {
        "key": "bankgiro",
        "value": "q"
    }
]

This is expected. Then after running

bin/giroapp init --org-name=qq --bgc-customer-number=qq --bankgiro=qq -n

settings.json looks like

[
    {
        "key": "bankgiro",
        "value": "qq"
    },
    {
        "key": "bgc_customer_number",
        "value": "q"
    },
    {
        "key": "bankgiro",
        "value": "q"
    }
]

This is an error!

And after again running

bin/giroapp init --org-name=q --bgc-customer-number=q --bankgiro=q -n

settings.json looks like

[
    {
        "key": "bankgiro",
        "value": "q"
    },
    {
        "key": "bankgiro",
        "value": "q"
    },
    {
        "key": "bankgiro",
        "value": "q"
    },
    {
        "key": "org_name",
        "value": "q"
    }
]

Unclear at this moment if this is related to the application layer or the database layer. Needs more investigation..