Commit 5ffaae68 authored by Ivan Tyagov's avatar Ivan Tyagov

Not always we have ZBIgArray set to an ERP5 Data Array thus handle this case...

Not always we have ZBIgArray set to an ERP5 Data Array thus handle this case and return None if missing.
parent b795855f
......@@ -110,9 +110,11 @@ class DataArray(BigFile):
security.declareProtected(Permissions.AccessContentsInformation, 'getArrayShape')
def getArrayShape(self):
"""
Get numpy array shape-
Get numpy array shape.
"""
return self.getArray().shape
zarray = self.getArray()
if zarray is not None:
return zarray.shape
security.declareProtected(Permissions.View, 'index_html')
def index_html(self, REQUEST, RESPONSE, format=_MARKER, inline=_MARKER, **kw):
......
......@@ -46,9 +46,9 @@
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:118, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:135, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:162, 10: No exception type(s) specified (bare-except)</string>
<string>W:120, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:137, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:164, 10: No exception type(s) specified (bare-except)</string>
</tuple>
</value>
</item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment