def get_or_create_storage_file(node, path, **kwargs):
 try:
  return OsfStorageGuidFile.find_one((Q('node', 'eq', node) & Q('path', 'eq', path)))
 except modm_errors.ModularOdmException as error:
  obj = OsfStorageGuidFile(node=node, path=path, **kwargs)
  obj.save()
 return obj

def get_or_create_storage_file ( node , path , ** kwargs ) : try : return OsfStorageGuidFile . find_one ( ( Q ( 'node' , 'eq' , node ) & Q ( 'path' , 'eq' , path ) ) ) except modm_errors . ModularOdmException as error : obj = OsfStorageGuidFile ( node = node , path = path , ** kwargs ) obj . save ( ) return obj
get or create osfstorageguidfile record .