Skip to content

Commit d97d063

Browse files
authored
Merge pull request #397 from realpython/contact-book-pyqt-code-fix
Remove some dead code flagged by a reader's comment
2 parents f852931 + a434579 commit d97d063

File tree

3 files changed

+0
-9
lines changed
  • python-contact-book

3 files changed

+0
-9
lines changed

python-contact-book/source_code_final/rpcontacts/views.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,4 @@ def accept(self):
149149

150150
self.data.append(field.text())
151151

152-
if not self.data:
153-
return
154-
155152
super().accept()

python-contact-book/source_code_step_5/rpcontacts/views.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,4 @@ def accept(self):
119119

120120
self.data.append(field.text())
121121

122-
if not self.data:
123-
return
124-
125122
super().accept()

python-contact-book/source_code_step_6/rpcontacts/views.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,4 @@ def accept(self):
149149

150150
self.data.append(field.text())
151151

152-
if not self.data:
153-
return
154-
155152
super().accept()

0 commit comments

Comments
 (0)