1👍
You should call .save()
over idSerial
first, it will returns eventID
updated instance, then you can set number attribute then save it.
idSerial = EventIdS(event, data=db_data)
if idSerial.is_valid():
eventID = idSerial.save()
eventID.number = event_id
eventID.save()
👤levi
Source:stackexchange.com