Commit 28755b00 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

fixed AttributeError: 'NoneType' object has no attribute 'date'


Signed-off-by: Benjamin Jakimow's avatarBenjamin Jakimow benjamin.jakimow@geo.hu-berlin.de <benjamin.jakimow@geo.hu-berlin.de>
parent 67a6d35b
......@@ -1316,8 +1316,9 @@ class MapWidget(QFrame):
mwNode.setAttribute('mapsPerMapView', f'{self.mapsPerMapView()}')
mwNode.setAttribute('mapWidth', f'{mapSize.width()}')
mwNode.setAttribute('mapHeight', f'{mapSize.height()}')
mwNode.setAttribute('mapDate', f'{self.currentDate().date()}')
currentDate = self.currentDate()
if isinstance(currentDate, TimeSeriesDate):
mwNode.setAttribute('mapDate', f'{currentDate.date()}')
crsNode = doc.createElement('MapExtent')
self.spatialExtent().writeXml(crsNode, doc)
mwNode.appendChild(crsNode)
......
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