Open
Description
The ContactModelSerializer
and DealModelSerializer
classes both include this line in the field validation method:
if field_name == 'owner_id' and field_value not in base_helpers.get_user_ids():
return False
The call to base_helpers.get_user_ids()
makes a network API call, which is not what you would expect from object instantiation. We need a way to either remove this until the synchronisation (it makes more sense to fail on sync with 'user not found' that on object instantiation), or at the very least to allow clients to force some kind of lazy validation.
The use case that highlighted this was trying to display the object JSON in the Django admin view, ironically in order to assist with debugging of synchronisation issues. If I want to load in an object, and serialize it, without pushing to Base, how can I do that?
Metadata
Metadata
Assignees
Labels
No labels