Skip to content

Commit

Permalink
Update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rixx committed May 7, 2024
1 parent b9dfa7b commit c959fcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pretalx_downstream/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from xml.etree import ElementTree as ET

import requests
from dateutil.parser import parse
import dateutil.parser
from django.db import transaction
from django.db.utils import IntegrityError
from django.utils.timezone import now
Expand Down Expand Up @@ -174,12 +174,12 @@ def _get_changes(talk, optout, sub, fallback_locale=None):

def _create_talk(*, talk, room, event):
date = talk.find("date").text
start = parse(date + " " + talk.find("start").text)
start = dateutil.parser.parse(date + " " + talk.find("start").text)
hours, minutes = talk.find("duration").text.split(":")
duration = dt.timedelta(hours=int(hours), minutes=int(minutes))
duration_in_minutes = duration.total_seconds() / 60
try:
end = parse(date + " " + talk.find("end").text)
end = dateutil.parser.parse(date + " " + talk.find("end").text)
except AttributeError:
end = start + duration
sub_type = SubmissionType.objects.filter(
Expand Down
2 changes: 1 addition & 1 deletion pretalx_downstream/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.contrib import messages
from django.utils.translation import gettext_lazy as _
from django.views.generic import FormView
from pretalx.common.mixins.views import PermissionRequired
from pretalx.common.views.mixins import PermissionRequired

from .forms import UpstreamSettingsForm
from .tasks import task_refresh_upstream_schedule
Expand Down

0 comments on commit c959fcf

Please sign in to comment.