Skip to content

Commit

Permalink
making availability types a list
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav committed Sep 11, 2024
1 parent 4b89ec1 commit a10877f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion courses/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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
Expand Down

0 comments on commit a10877f

Please sign in to comment.