Skip to content

Commit

Permalink
fix: include methodology diff in infobase exort (#388)
Browse files Browse the repository at this point in the history
* fix: include methodology diff in infobase exort; incerase name_fr charlimit

* fix: reformat
  • Loading branch information
msarar authored Oct 7, 2024
1 parent 6770c8d commit 9640054
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
23 changes: 23 additions & 0 deletions server/cpho/migrations/0043_alter_indicator_name_fr_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.0.6 on 2024-10-07 16:21

import server.fields
from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("cpho", "0042_indicator_benchmarking_dynamic_text_and_more"),
]

operations = [
migrations.AlterField(
model_name="indicator",
name="name_fr",
field=server.fields.CharField(max_length=100, null=True),
),
migrations.AlterField(
model_name="indicatorhistory",
name="name_fr",
field=server.fields.CharField(max_length=100, null=True),
),
]
2 changes: 1 addition & 1 deletion server/cpho/models/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Indicator(models.Model, SubmissionHelpersMixin):
]

name = fields.CharField(max_length=50)
name_fr = fields.CharField(max_length=50, null=True, blank=True)
name_fr = fields.CharField(max_length=100, null=True, blank=True)

category = fields.CharField(
max_length=50,
Expand Down
6 changes: 5 additions & 1 deletion server/cpho/views/infobase_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@
ModelColumn(BenchmarkingHistory, "year"),
ChoiceColumn(BenchmarkingHistory, "comparison_to_oecd_avg"),
ChoiceColumn(BenchmarkingHistory, "labels"),
CustomColumn(
"Methodology differences",
lambda x: "True" if x.methodology_differences else "False",
),
]

trend_columns = [
Expand Down Expand Up @@ -367,7 +371,7 @@ def get_queryset(self):

class TrendSheetWriter(ModelToSheetWriter):
columns = trend_columns
sheet_name = "trend"
sheet_name = "trend analysis"

def get_queryset(self):
data = ExportHelpers.get_submitted_trend_analysis()
Expand Down

0 comments on commit 9640054

Please sign in to comment.