Skip to content

Commit

Permalink
fixes regression with UNION in sqlite3
Browse files Browse the repository at this point in the history
  • Loading branch information
smirolo committed Jan 4, 2025
1 parent fe30ace commit 84f17dd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN /usr/local/bin/python3 -m venv --upgrade-deps /app --system-site-packages
# so we don't have to rebuild a container to investigate when something
# goes wrong.
RUN /app/bin/pip install cairocffi==1.3.0 coverage==6.3.2 psycopg2-binary==2.9.3 setproctitle==1.2.3
RUN /app/bin/pip install Django==4.2.16 djangorestframework==3.14.0 djaodjin-deployutils==0.11.0 djaodjin-extended-templates==0.4.6 djaodjin-pages==0.8.3 djaodjin-survey==0.14.0 docutils==0.20.1 drf-spectacular==0.27.2 gunicorn==20.1.0 jinja2==3.1.2 html5lib==1.1 monotonic==1.6 openpyxl==3.1.2 python-pptx==0.6.21 pytz==2023.3 django-debug-toolbar==3.5.0 django-extensions==3.2.0 Faker==2.0.0 sqlparse==0.4.4
RUN /app/bin/pip install Django==4.2.16 djangorestframework==3.14.0 djaodjin-deployutils==0.11.0 djaodjin-extended-templates==0.4.6 djaodjin-pages==0.8.3 djaodjin-survey==0.14.1 docutils==0.20.1 drf-spectacular==0.27.2 gunicorn==20.1.0 jinja2==3.1.2 html5lib==1.1 monotonic==1.6 openpyxl==3.1.2 python-pptx==0.6.21 pytz==2023.3 django-debug-toolbar==3.5.0 django-extensions==3.2.0 Faker==2.0.0 sqlparse==0.4.4

# Bundle app source
COPY . /app/reps/djaopsp
Expand Down
1 change: 1 addition & 0 deletions djaopsp/api/portfolios.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ def get(self, request, *args, **kwargs):
class CompletedAssessmentsMixin(AccountMixin):

def get_queryset(self):
# `get_latest_frozen_by_accounts` queryset is not sorted by default.
queryset = Sample.objects.filter(
pk__in=[sample.pk
for sample in Sample.objects.get_latest_frozen_by_accounts(
Expand Down
2 changes: 1 addition & 1 deletion djaopsp/sustainability/scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def _get_expected_opportunities_sql(population, unit_id,

def _get_opportunities_sql(population, unit_id, prefix=None):
if isinstance(population, six.string_types):
# We assument `population` is a SQL query.
# We assume `population` is a SQL query.
sample_population = ("SELECT id FROM (%s) AS sample_population" %
population)
else:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ djangorestframework==3.14.0 # 3.12.4 not compatible with Django4.2
djaodjin-deployutils==0.11.0
djaodjin-extended-templates==0.4.6
djaodjin-pages==0.8.3
djaodjin-survey==0.14.0
djaodjin-survey==0.14.1
docutils==0.20.1 # Technically only needed for schema generation but
# djangorestframework will import regardless.
gunicorn==20.1.0
Expand Down

0 comments on commit 84f17dd

Please sign in to comment.