[Fix] argparse group option not an array
This commit is contained in:
parent
17d8d5d813
commit
7986fe8e5b
@ -16,14 +16,13 @@ if __name__ == "__main__":
|
|||||||
case pfbudget.Operation.CategoryAdd:
|
case pfbudget.Operation.CategoryAdd:
|
||||||
assert args.keys() >= {"category", "group"}, "argparser ill defined"
|
assert args.keys() >= {"category", "group"}, "argparser ill defined"
|
||||||
params = [
|
params = [
|
||||||
pfbudget.types.Category(cat, args["group"][0])
|
pfbudget.types.Category(cat, args["group"]) for cat in args["category"]
|
||||||
for cat in args["category"]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
case pfbudget.Operation.CategoryUpdate:
|
case pfbudget.Operation.CategoryUpdate:
|
||||||
assert args.keys() >= {"category", "group"}, "argparser ill defined"
|
assert args.keys() >= {"category", "group"}, "argparser ill defined"
|
||||||
params = [pfbudget.types.Category(cat) for cat in args["category"]]
|
params = [pfbudget.types.Category(cat) for cat in args["category"]]
|
||||||
params.append(args["group"][0])
|
params.append(args["group"])
|
||||||
|
|
||||||
case pfbudget.Operation.CategoryRemove:
|
case pfbudget.Operation.CategoryRemove:
|
||||||
assert "category" in args, "argparser ill defined"
|
assert "category" in args, "argparser ill defined"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user