Skip to content

Commit

Permalink
Merge pull request #1 from kvbik/serialize-schedule
Browse files Browse the repository at this point in the history
serialize schedule
  • Loading branch information
wslyvh authored Aug 21, 2024
2 parents c8a1620 + 09f7792 commit 7ff1f81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pretalx_webhook/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from django.conf import settings
from pretalx.orga.signals import nav_event_settings
from pretalx.schedule.signals import schedule_release
from pretalx.api.serializers.submission import ScheduleSerializer

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -43,6 +44,7 @@ def on_schedule_release(sender, schedule, user, **kwargs):
'sender': str(sender),
'schedule': str(schedule),
'user': str(user),
'schedule-serialized': ScheduleSerializer(schedule).data,
}

logger.error(f"Prepare payload..")
Expand All @@ -67,4 +69,4 @@ def on_schedule_release(sender, schedule, user, **kwargs):
logger.error(f"Webhook failed for event {sender.slug}. Status code: {response.status_code}")

except Exception as e:
logger.error(f"Error sending webhook for event {sender.slug}: {str(e)}")
logger.error(f"Error sending webhook for event {sender.slug}: {str(e)}")

0 comments on commit 7ff1f81

Please sign in to comment.