Skip to content
Snippets Groups Projects
Commit 05634268 authored by Franz Knuth's avatar Franz Knuth
Browse files

caching_backend: small bugfixes

parent 9912a19e
Branches
Tags
No related merge requests found
import json
import numpy as np
import sys
import logging
from nomadcore import parser_backend
class CachingLevel(object):
......@@ -116,7 +117,7 @@ class CachingSectionManager(object):
superSect.addSubsection(self.metaInfo, toClose)
else:
backend.storeToClosedSuper(superName, superGIndex, self.metaInfo, toClose)
if toClose.references.isEmpty:
if not toClose.references: # checks for empty list
backend.parsingSession.addSubsection(self.metaInfo, toClose)
if self.forwardOpenClose and backend.superBackend:
backend.superBackend.closeSection(self.metaInfo.name, gIndex)
......@@ -144,7 +145,7 @@ class CachingSectionManager(object):
gI = self.lastSectionGIndex
else:
gI = gIndex
self.openSections[gI].setArrayValues(valueMetaInfo, value, gIndex)
self.openSections[gI].setArrayValues(valueMetaInfo, value, offset)
def addArrayValues(self, valueMetaInfo, value, offset = None, gIndex = -1):
if gIndex == -1:
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment