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): ...@@ -110,9 +110,11 @@ class DataArray(BigFile):
security.declareProtected(Permissions.AccessContentsInformation, 'getArrayShape') security.declareProtected(Permissions.AccessContentsInformation, 'getArrayShape')
def getArrayShape(self): 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') security.declareProtected(Permissions.View, 'index_html')
def index_html(self, REQUEST, RESPONSE, format=_MARKER, inline=_MARKER, **kw): def index_html(self, REQUEST, RESPONSE, format=_MARKER, inline=_MARKER, **kw):
......
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
<key> <string>text_content_warning_message</string> </key> <key> <string>text_content_warning_message</string> </key>
<value> <value>
<tuple> <tuple>
<string>W:118, 42: Redefining built-in \'format\' (redefined-builtin)</string> <string>W:120, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:135, 4: Redefining built-in \'range\' (redefined-builtin)</string> <string>W:137, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:162, 10: No exception type(s) specified (bare-except)</string> <string>W:164, 10: No exception type(s) specified (bare-except)</string>
</tuple> </tuple>
</value> </value>
</item> </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