Simplified boolean variable check

Currently 'self.cells' is being checked
for empty list like 'if self.cells == []:'.
The more standard approach is like 'if not self.cells:'.

TrivialFix

Change-Id: I681e11c13696f3e85c3598838ac5ed33c378de3f
This commit is contained in:
Ravi Shekhar Jethani 2015-11-19 01:50:03 -08:00
parent c99bc512b5
commit 44ed0a452c
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class FormsetRow(horizon_tables.Row):
def __init__(self, column, datum, form):
self.form = form
super(FormsetRow, self).__init__(column, datum)
if self.cells == []:
if not self.cells:
# We need to be able to handle empty rows, because there may
# be extra empty forms in a formset. The original DataTable breaks
# on this, because it sets self.cells to [], but later expects a