We shouldn't serialize derived fields (like ticket ID) and we should only serialize changed fields when syncing updates to airtable.
Firstly, we need to set const=True for all derived fields, to prevent automation from updating them. We should also store a snapshot of the initial unmodified model in a _snapshot field, and use that to generate a delta when serializing to airtable. Once the save is successful we can update the snapshot to reflect the current state of the model.
We shouldn't serialize derived fields (like ticket ID) and we should only serialize changed fields when syncing updates to airtable.
Firstly, we need to set
const=True
for all derived fields, to prevent automation from updating them. We should also store a snapshot of the initial unmodified model in a_snapshot
field, and use that to generate a delta when serializing to airtable. Once the save is successful we can update the snapshot to reflect the current state of the model.