Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 20, 2024
1 parent 96d99c9 commit bf9ad88
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
18 changes: 13 additions & 5 deletions courses/migrations/0040_alter_courserun_courseware_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@


class Migration(migrations.Migration):

dependencies = [
('courses', '0039_add_external_course_id_and_course_run_id'),
("courses", "0039_add_external_course_id_and_course_run_id"),
]

operations = [
migrations.AlterField(
model_name='courserun',
name='courseware_id',
field=models.CharField(max_length=255, unique=True, validators=[django.core.validators.RegexValidator('^[\\w\\-+:]+$', 'This field is used to produce URL paths. It must contain only characters that match this pattern: [\\w\\-+:]')]),
model_name="courserun",
name="courseware_id",
field=models.CharField(
max_length=255,
unique=True,
validators=[
django.core.validators.RegexValidator(
"^[\\w\\-+:]+$",
"This field is used to produce URL paths. It must contain only characters that match this pattern: [\\w\\-+:]",
)
],
),
),
]
4 changes: 3 additions & 1 deletion courses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,9 @@ class CourseRun(TimestampedModel):
)
product = GenericRelation(Product, related_query_name="course_run")
title = models.CharField(max_length=255)
courseware_id = models.CharField(max_length=255, unique=True, validators=[validate_url_path_field])
courseware_id = models.CharField(
max_length=255, unique=True, validators=[validate_url_path_field]
)
run_tag = models.CharField(
max_length=10,
help_text="A string that identifies the set of runs that this run belongs to (example: 'R2')",
Expand Down

0 comments on commit bf9ad88

Please sign in to comment.