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

Merge branch 'f-empty' into 'dev'

Allow empty records

See merge request !132
parents 942cf082 369286d6
No related branches found
No related tags found
2 merge requests!160STY: styling,!132Allow empty records
Pipeline #41704 passed
......@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed ###
### Fixed ###
- Empty Records can now be created (https://gitlab.com/caosdb/caosdb-crawler/-/issues/27)
* [#58](https://gitlab.com/caosdb/caosdb-crawler/-/issues/58) Documentation builds API docs in pipeline now.
......
......@@ -235,6 +235,12 @@ def create_records(values: GeneralStore, records: RecordStore, def_records: dict
keys_modified = []
for name, record in def_records.items():
# If only a name was given (Like this:
# Experiment:
# ) set record to an empty dict / empty configuration
if record is None:
record = {}
role = "Record"
# This allows us to create e.g. Files
if "role" in record:
......
......@@ -10,7 +10,6 @@ data:
match_name: '.*'
records:
Experiment:
name: "e"
Projekt:
parents: ["project"]
name: "p"
......@@ -25,6 +24,7 @@ data:
records:
Experiment:
parents: ["Exp"]
name: "e"
Projekt:
parents: ["Projekt"]
Campaign:
......
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