Merge pull request #669 from Arthur-Milchior/dont_create_empty_deck_name

Strip name of added deck
This commit is contained in:
Damien Elmes 2020-06-22 12:00:29 +10:00 committed by GitHub
commit 500ec7da0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,6 +145,7 @@ class StudyDeck(QDialog):
else:
default = self.names[self.form.list.currentRow()]
n = getOnlyText(_("New deck name:"), default=default)
n = n.strip()
if n:
did = self.mw.col.decks.id(n)
# deck name may not be the same as user input. ex: ", ::