Skip to content

Commit 7bc384f

Browse files
getting the public Id when creating the session
1 parent 00cda86 commit 7bc384f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Backend/apps/simulations/serializers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ class SimulationSessionsCreateSerializer(serializers.ModelSerializer):
9292
class Meta:
9393
model = SimulationSessions
9494
fields = [
95+
'public_id',
9596
'session_name',
9697
'description',
9798
'automata_type',
9899
'automata_data'
99100
]
101+
read_only_fields = ['public_id']
100102

101103
# Validate automata_data structure
102104
def validate_automata_data(self, value):

0 commit comments

Comments
 (0)