Commit 7d52501e authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg Committed by Luko van der Maas
Browse files

Fix pep issues

parent db0b56d1
......@@ -44,13 +44,15 @@ def partner_image_card(image):
def vacancy_card(vacancy):
image_url = ''
if vacancy.get_company_logo:
image_url = thumbnail(vacancy.get_company_logo(), settings.THUMBNAIL_SIZES['medium'], fit=False)
image_url = thumbnail(vacancy.get_company_logo(),
settings.THUMBNAIL_SIZES['medium'], fit=False)
description = truncatechars(bleach(striptags(vacancy.description)), 150)
extra_class = 'external-vacancy'
url = '#vacancy-{}'.format(vacancy.id)
if vacancy.partner:
url = '{}#vacancy-{}'.format(vacancy.partner.get_absolute_url(), vacancy.id)
url = '{}#vacancy-{}'.format(vacancy.partner.get_absolute_url(),
vacancy.id)
extra_class = ''
return {
......
......@@ -7,7 +7,7 @@ $(function() {
},
afterShow: function() {
var downloadUrl = $(this.element).attr('data-download');
if(downloadUrl != undefined) {
if(downloadUrl !== undefined) {
$('<a class="btn btn-primary fancybox-download" href="' + downloadUrl + '"><i class="fas fa-download"></i></a>').appendTo(this.outer);
}
},
......
......@@ -364,7 +364,8 @@ class Command(BaseCommand):
padding=(10, 10, 10, 10),
output_format='jpeg',
) # 620x620 pixels, with 10 pixels padding on each side
vacancy.company_logo.save(vacancy.company_name + '.jpeg', ContentFile(icon))
vacancy.company_logo.save(vacancy.company_name + '.jpeg',
ContentFile(icon))
if random.random() < 0.5:
vacancy.expiration_date = _faker.date_time_between("-1y", "+1y")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment