Skip to content

Commit fd0a4d0

Browse files
authored
Jobs: Make URL field required, per @bwaliszewski (#1525)
* Jobs: Make URL field required, per @bwaliszewski * Jobs: add required parameter to test for jobs submission form
1 parent cfbc67d commit fd0a4d0

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 2.0.13 on 2019-11-01 16:01
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('jobs', '0019_job_submitted_by'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='job',
15+
name='url',
16+
field=models.URLField(null=True, verbose_name='URL'),
17+
),
18+
]

jobs/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Job(ContentManageable):
109109
url = models.URLField(
110110
verbose_name='URL',
111111
null=True,
112-
blank=True)
112+
blank=False)
113113

114114
submitted_by = models.ForeignKey(
115115
User,

jobs/tests/test_views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ def test_job_create(self):
301301
'country': 'USA',
302302
'description': 'Lorem ipsum dolor sit amet',
303303
'requirements': 'Some requirements',
304-
'email': 'hr@company.com'
304+
'email': 'hr@company.com',
305+
'url': 'https://jobs.company.com',
305306
}
306307

307308
# Check that anonymous posting is not allowed. See #852.

0 commit comments

Comments
 (0)