From 6df70c288f04c52187298b94b0ed20a3e8a5d55b Mon Sep 17 00:00:00 2001 From: Felix Blanke <info@fblanke.de> Date: Wed, 29 May 2024 01:14:59 +0200 Subject: [PATCH] Export ids as str --- AKModel/models.py | 4 ++-- AKModel/views/ak.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AKModel/models.py b/AKModel/models.py index 5337bb4f..8e221a3a 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -587,7 +587,7 @@ class Room(models.Model): time_constraints = [f"availability-room-{self.pk}"] data = { - "id": self.pk, + "id": str(self.pk), "info": { "name": self.name, }, @@ -714,7 +714,7 @@ class AKSlot(models.Model): return [f"availability-person-{owner.pk}"] data = { - "id": self.pk, + "id": str(self.pk), "duration": int(self.duration * self.slots_in_an_hour), "properties": {}, "room_constraints": [constraint.name diff --git a/AKModel/views/ak.py b/AKModel/views/ak.py index d3b0e93c..b8b55ee8 100644 --- a/AKModel/views/ak.py +++ b/AKModel/views/ak.py @@ -131,7 +131,7 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView): constraints.append(f"availability-room-{room}") current_block.append({ - "id": slot_index, + "id": str(slot_index), "info": { "start": slot.simplified, }, -- GitLab