From 7986fe8e5b480894edf0c1a5166d70ff9eb3edd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Murta?= Date: Sat, 17 Dec 2022 20:59:40 +0000 Subject: [PATCH] [Fix] argparse group option not an array --- pfbudget/__main__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pfbudget/__main__.py b/pfbudget/__main__.py index 4238e1e..3785629 100644 --- a/pfbudget/__main__.py +++ b/pfbudget/__main__.py @@ -16,14 +16,13 @@ if __name__ == "__main__": case pfbudget.Operation.CategoryAdd: assert args.keys() >= {"category", "group"}, "argparser ill defined" params = [ - pfbudget.types.Category(cat, args["group"][0]) - for cat in args["category"] + pfbudget.types.Category(cat, args["group"]) for cat in args["category"] ] case pfbudget.Operation.CategoryUpdate: assert args.keys() >= {"category", "group"}, "argparser ill defined" params = [pfbudget.types.Category(cat) for cat in args["category"]] - params.append(args["group"][0]) + params.append(args["group"]) case pfbudget.Operation.CategoryRemove: assert "category" in args, "argparser ill defined"