Strip whitespaces from tree name

This commit is contained in:
Pavle Portic 2019-03-24 23:02:06 +01:00
parent 4ef4390d99
commit 1473712344
Signed by: TheEdgeOfRage
GPG Key ID: 6758ACE46AA2A849
2 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ class PerkParser():
for p in self.perks:
perk = self.create_perk(name=p['name'].strip(), effect=p['effect'].strip(), level=int(p['level']), perk_type=0)
for tree_name in p['tree'].split(','):
tree_name = tree_name.strip()
try:
tree = Tree.objects.get(name=tree_name)
perk.trees.add(tree)

View File

@ -24,7 +24,7 @@
color="primary"
flat
@click="dialog = false"
>Colse</v-btn>
>Close</v-btn>
</v-card-actions>
</v-card>
</v-dialog>