Skip to content

Commit 0994d02

Browse files
authored
metadata: do not parse version in YAML (#244)
1 parent 0b14f7b commit 0994d02

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

gramps_webapi/api/resources/metadata.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,11 @@ def get(self) -> Response:
6262
if key == db_key:
6363
db_type = db_summary[0][key]
6464

65-
with open(
66-
resource_filename("gramps_webapi", "data/apispec.yaml")
67-
) as file_handle:
68-
schema = yaml.safe_load(file_handle)
69-
7065
result = {
7166
"database": {"id": db_handle.get_dbid(), "name": db_name, "type": db_type,},
7267
"default_person": db_handle.get_default_handle(),
7368
"gramps": {"version": ENV["VERSION"],},
74-
"gramps_webapi": {"schema": schema["info"]["version"], "version": VERSION,},
69+
"gramps_webapi": {"schema": VERSION, "version": VERSION,},
7570
"locale": {
7671
"lang": GRAMPS_LOCALE.lang,
7772
"language": GRAMPS_LOCALE.language[0],

0 commit comments

Comments
 (0)