Skip to content
Snippets Groups Projects
Commit 919cd0b5 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-parents' into 'dev'

Overwrite parents

See merge request !130
parents 03cb9c91 f2018e31
No related branches found
No related tags found
2 merge requests!160STY: styling,!130Overwrite parents
Pipeline #40966 passed
......@@ -24,29 +24,29 @@
#
from __future__ import annotations
from jsonschema import validate, ValidationError
import os
import re
import datetime
import caosdb as db
import json
import logging
import os
import re
import warnings
from .utils import has_parent
from .stores import GeneralStore, RecordStore
from .structure_elements import (StructureElement, Directory, File, DictElement, JSONFile,
IntegerElement, BooleanElement, FloatElement, NoneElement,
TextElement, TextElement, ListElement)
from typing import List, Optional, Tuple, Union
from abc import ABCMeta, abstractmethod
from string import Template
import yaml_header_tools
from typing import List, Optional, Tuple, Union
import caosdb as db
import pandas as pd
import logging
import yaml
import yaml_header_tools
from jsonschema import ValidationError, validate
from .stores import GeneralStore, RecordStore
from .structure_elements import (BooleanElement, DictElement, Directory, File,
FloatElement, IntegerElement, JSONFile,
ListElement, NoneElement, StructureElement,
TextElement)
from .utils import has_parent
# These are special properties which are (currently) treated differently
# by the converters:
......@@ -300,6 +300,7 @@ def create_records(values: GeneralStore, records: RecordStore, def_records: dict
# no matter whether the record existed in the record store or not,
# parents will be added when they aren't present in the record yet:
if "parents" in record:
c_record.parents.clear()
for parent in record["parents"]:
# Do the variables replacement:
var_replaced_parent = replace_variables(parent, values)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment