From 260189900aa79fa2b6d800890409f6c9aa8d40b6 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 3b0e8079..7e98bef5 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -640,7 +640,7 @@ class Room(models.Model): time_constraints = [f"availability-room-{self.pk}"] data = { - "id": self.pk, + "id": str(self.pk), "info": { "name": self.name, }, @@ -768,7 +768,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