Skip to content
Snippets Groups Projects
Commit 2201fd21 authored by Sabine Schröder's avatar Sabine Schröder
Browse files

#3: added kind of annotation to API for controlled vocabulary (and to pages)

parent a71128ec
No related branches found
No related tags found
No related merge requests found
Pipeline #52366 passed
......@@ -420,6 +420,10 @@
[0, 'active', 'active'],
[1, 'inactive', 'inactive'],
[2, 'unknown', 'unknown']]
#### Kind Of Annotations ####
* Kind of Annotations: [
[0, 'User', 'user comment'],
[1, 'Provider', 'provider comment']]
#### Kind Of Organizations ####
* Kind of Organizations: [
[1, 'Government', 'government'],
......
......@@ -24,6 +24,7 @@ async def info():
controlled_vocabulary = {
"Role Codes": settings.RC_vocab,
"Role Status": settings.RS_vocab,
"Kind of Annotations": settings.AK_vocab,
"Kind of Organizations": settings.OK_vocab,
"Data Access Rights": settings.DA_vocab,
"Sampling Frequencies": settings.SF_vocab,
......@@ -48,6 +49,7 @@ async def info(name: str):
controlled_vocabulary = {
"Role Codes": settings.RC_vocab,
"Role Status": settings.RS_vocab,
"Kind of Annotations": settings.AK_vocab,
"Kind of Organizations": settings.OK_vocab,
"Data Access Rights": settings.DA_vocab,
"Sampling Frequencies": settings.SF_vocab,
......@@ -119,6 +121,7 @@ async def startup_event():
fake_cur = fake_conn.cursor()
RC_vocabulary = __get_enum_dict(fake_cur, "rc_vocabulary")
RS_vocabulary = __get_enum_dict(fake_cur, "rs_vocabulary")
AK_vocabulary = __get_enum_dict(fake_cur, "ak_vocabulary")
OK_vocabulary = __get_enum_dict(fake_cur, "ok_vocabulary")
DA_vocabulary = __get_enum_dict(fake_cur, "da_vocabulary")
SF_vocabulary = __get_enum_dict(fake_cur, "sf_vocabulary")
......@@ -142,6 +145,7 @@ fake_conn = engine.raw_connection()
fake_cur = fake_conn.cursor()
RC_vocabulary = __get_enum_dict(fake_cur, "rc_vocabulary")
RS_vocabulary = __get_enum_dict(fake_cur, "rs_vocabulary")
AK_vocabulary = __get_enum_dict(fake_cur, "ak_vocabulary")
OK_vocabulary = __get_enum_dict(fake_cur, "ok_vocabulary")
DA_vocabulary = __get_enum_dict(fake_cur, "da_vocabulary")
SF_vocabulary = __get_enum_dict(fake_cur, "sf_vocabulary")
......@@ -164,6 +168,7 @@ class Settings(BaseSettings):
Enumdict=namedtuple("Dict",["value","string","display_str"])
RC_vocab = RC_vocabulary
RS_vocab = RS_vocabulary
AK_vocab = AK_vocabulary
OK_vocab = OK_vocabulary
DA_vocab = DA_vocabulary
SF_vocab = SF_vocabulary
......
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