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

Fix missing migration on Program.availability #2389

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
making availability types a list
annagav committed Sep 11, 2024
commit a10877fb8f9d576032bff4ceb339eaff25266510
2 changes: 1 addition & 1 deletion courses/constants.py
Original file line number Diff line number Diff line change
@@ -34,5 +34,5 @@

AVAILABILITY_ANYTIME = "anytime"
AVAILABILITY_DATED = "dated"
AVAILABILITY_TYPES = {AVAILABILITY_ANYTIME, AVAILABILITY_DATED}
AVAILABILITY_TYPES = [AVAILABILITY_ANYTIME, AVAILABILITY_DATED]
AVAILABILITY_CHOICES = list(zip(AVAILABILITY_TYPES, AVAILABILITY_TYPES))
2 changes: 1 addition & 1 deletion courses/models.py
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@ class Meta:
)
departments = models.ManyToManyField(Department, blank=False)
availability = models.CharField(
choices=[("anytime", "anytime"), ("dated", "dated")], default=AVAILABILITY_ANYTIME, max_length=255
choices=AVAILABILITY_CHOICES, default=AVAILABILITY_ANYTIME, max_length=255
)

@cached_property