Merge "Refactor cell_type in compute/api.py"

This commit is contained in:
Zuul 2018-08-08 20:00:53 +00:00 committed by Gerrit Code Review
commit 33415e5343
1 changed files with 1 additions and 5 deletions

View File

@ -275,11 +275,7 @@ class API(base.Base):
@property
def cell_type(self):
try:
return getattr(self, '_cell_type')
except AttributeError:
self._cell_type = cells_opts.get_cell_type()
return self._cell_type
return getattr(self, '_cell_type', cells_opts.get_cell_type())
def _validate_cell(self, instance):
if self.cell_type != 'api':