Skip to content

Commit feb002d

Browse files
EKIRJASTO-22 Add audience to queries and header
1 parent 82057e8 commit feb002d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

api/local_analytics_exporter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def export_excel(self, _db, start, end, locations=None, library=None):
8989
"Sijainti",
9090
"Formaatti",
9191
"Kategoria(t)",
92+
"Kohderyhmä",
9293
"Kieli",
9394
"Kustantaja/Julkaisija",
9495
"Kaikki lainat",
@@ -123,6 +124,8 @@ def export_excel(self, _db, start, end, locations=None, library=None):
123124
row.get("medium", ""),
124125
# Kategoria(t)
125126
categories,
127+
# Kohderyhmä
128+
row.get("audience", ""),
126129
# Kieli
127130
row.get("language", ""),
128131
# Kustantaja/Julkaisija
@@ -392,6 +395,7 @@ def analytics_query_loan_statistics(self, start, end, locations=None, library=No
392395
[(Work.fiction == True, True)],
393396
else_=False,
394397
).label("fiction"),
398+
Work.audience,
395399
Work.id.label("work_id"),
396400
Edition.publisher,
397401
Edition.language,
@@ -516,6 +520,7 @@ def analytics_query_loan_statistics(self, start, end, locations=None, library=No
516520
events.publisher,
517521
events.language,
518522
genres.label("genres"),
523+
events.audience,
519524
contributors.label("contributors"),
520525
events.location,
521526
events.library_name,

0 commit comments

Comments
 (0)