Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.107.0 #2491

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release Notes
=============

Version 0.107.0
---------------

- fix(deps): update dependency django to v4.2.17 [security] (#2490)
- Populate max min weekly hours (#2488)

Version 0.106.1 (Released December 09, 2024)
---------------

Expand Down
42 changes: 42 additions & 0 deletions cms/migrations/0042_populate_weekly_hours.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Generated by Django 4.2.16 on 2024-12-05 19:39
import re

from django.db import migrations


def populate_weekly_hours_fields(apps, schema_editor):
CoursePage = apps.get_model("cms", "CoursePage")
for page in CoursePage.objects.all():
if page.effort:
effort_str = page.effort.lower()
effort_nums = re.findall(r"\d+", effort_str)
if len(effort_nums) > 0:
page.min_weekly_hours = effort_nums[0]
page.max_weekly_hours = (
effort_nums[1] if len(effort_nums) > 1 else effort_nums[0]
)
page.save()

ProgramPage = apps.get_model("cms", "ProgramPage")
for page in ProgramPage.objects.all():
if page.effort:
effort_str = page.effort.lower()
effort_nums = re.findall(r"\d+", effort_str)
if len(effort_nums) > 0:
page.min_weekly_hours = effort_nums[0]
page.max_weekly_hours = (
effort_nums[1] if len(effort_nums) > 1 else effort_nums[0]
)
page.save()


class Migration(migrations.Migration):
dependencies = [
("cms", "0041_populate_min_weeks"),
]

operations = [
migrations.RunPython(
populate_weekly_hours_fields, reverse_code=migrations.RunPython.noop
),
]
2 changes: 1 addition & 1 deletion main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from main.celery_utils import OffsettingSchedule
from main.sentry import init_sentry

VERSION = "0.106.1"
VERSION = "0.107.0"

log = logging.getLogger()

Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ celery = "^5.2.2"
celery-redbeat = "^2.0.0"
deepdiff = "^6.6.1"
dj-database-url = "^0.5.0"
django = "4.2.16"
django = "4.2.17"
django-anymail = {extras = ["mailgun"], version = "^11.1"}
django-cors-headers = "^4.0.0"
django-countries = "^7.2.1"
Expand Down
Loading