Skip to content

Commit 2aa580d

Browse files
committed
ci: ruff fixes
1 parent 09b9990 commit 2aa580d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

organize/models.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def create(self, **data_dict):
6060
event_date = data_dict["date"]
6161
try:
6262
if date(event_date.year, event_date.month, event_date.day) - date(
63-
previous_event.date.year, previous_event.date.month, previous_event.date.day
63+
previous_event.date.year,
64+
previous_event.date.month,
65+
previous_event.date.day,
6466
) < timedelta(days=180):
6567
raise ValidationError(
6668
{
@@ -114,7 +116,8 @@ class EventApplication(models.Model):
114116
remote = models.BooleanField(default=False)
115117
tools = models.TextField(_("Information about how you will host your remote workshop"), blank=True)
116118
local_restrictions = models.TextField(
117-
_("Information about local restrictions for physical restrictions due to Covid-19 pandemic."), blank=True
119+
_("Information about local restrictions for physical restrictions due to Covid-19 pandemic."),
120+
blank=True,
118121
)
119122
safety = models.TextField(
120123
_("Information about how you will ensure participants' and coaches' safety during the Covid-19 pandemic"),
@@ -208,7 +211,7 @@ def deploy(self):
208211
- send email about deployment
209212
"""
210213
if self.status == DEPLOYED: # we don't want to deploy twice
211-
return
214+
return None
212215

213216
self.change_status_to(DEPLOYED)
214217

@@ -234,7 +237,7 @@ def deploy(self):
234237

235238
def send_deployed_email(self, event):
236239
# sort out Gmail accounts
237-
dummy_email, email_password = gmail_accounts.get_or_create_gmail(event_application=self, event=event)
240+
_, email_password = gmail_accounts.get_or_create_gmail(event_application=self, event=event)
238241

239242
# TODO: remove organizers, who are no longer in org team if cloned
240243
send_application_deployed_email(event_application=self, event=event, email_password=email_password)

0 commit comments

Comments
 (0)