Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@property
def preview_image(self):
if self._preview_image is None:
error = "Workbook item must be populated with its preview image first."
raise UnpopulatedPropertyError(error)
return self._preview_image
def tables(self):
if self._tables is None:
error = "Database must be populated with tables first."
raise UnpopulatedPropertyError(error)
# Each call to `.tables` should create a new pager, this just runs the callable
return self._tables()
def default_workbook_permissions(self):
if self._default_workbook_permissions is None:
error = "Project item must be populated with permissions first."
raise UnpopulatedPropertyError(error)
return self._default_workbook_permissions()
def permissions(self):
if self._permissions is None:
error = "Project item must be populated with permissions first."
raise UnpopulatedPropertyError(error)
return self._permissions()
def default_datasource_permissions(self):
if self._default_datasource_permissions is None:
error = "Project item must be populated with permissions first."
raise UnpopulatedPropertyError(error)
return self._default_datasource_permissions()
def workbooks(self):
if self._workbooks is None:
error = "User item must be populated with workbooks first."
raise UnpopulatedPropertyError(error)
return self._workbooks()
def preview_image(self):
if self._preview_image is None:
error = "Workbook item must be populated with its preview image first."
raise UnpopulatedPropertyError(error)
return self._preview_image()
def total_views(self):
if self._total_views is None:
error = "Usage statistics must be requested when querying for view."
raise UnpopulatedPropertyError(error)
return self._total_views
@property
def connections(self):
if self._connections is None:
error = "Workbook item must be populated with connections first."
raise UnpopulatedPropertyError(error)
return self._connections
def connections(self):
if self._connections is None:
error = 'Datasource item must be populated with connections first.'
raise UnpopulatedPropertyError(error)
return self._connections()