Should this call to update_or_create() be replaced with update()? In the case a lookup_value is passed but doesn't exist, a create will be triggered, which I don't think is what we want. I think our "rule" is that the existence of a lookup_field means update and that the absence of a lookup_field means create. To follow this rule, I think that means we should never call any "or" functions like get_or_create or update_or_create. Right?
Should this call to
update_or_create()
be replaced withupdate()
? In the case alookup_value
is passed but doesn't exist, a create will be triggered, which I don't think is what we want. I think our "rule" is that the existence of alookup_field
means update and that the absence of alookup_field
means create. To follow this rule, I think that means we should never call any "or" functions likeget_or_create
orupdate_or_create
. Right?https://github.com/kaoslabsinc/dj-kaos-utils/blob/617aca24ccf5cfed35a1e9864a42c401336d7534/dj_kaos_utils/rest/serializers.py#L107-L126