✨(contacts) add notes & force full_name
We make the full name mandatory and add a field to allow user to store personnal notes on the contact. This also make the "base" contact not mandatory because user may want to create new contacts out of the blue.
This commit is contained in:
@@ -17,10 +17,14 @@ class ContactSerializer(serializers.ModelSerializer):
|
||||
"base",
|
||||
"data",
|
||||
"full_name",
|
||||
"notes",
|
||||
"owner",
|
||||
"short_name",
|
||||
]
|
||||
read_only_fields = ["id", "owner"]
|
||||
extra_kwargs = {
|
||||
"base": {"required": False},
|
||||
}
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
"""Make "base" field readonly but only for update/patch."""
|
||||
|
||||
Reference in New Issue
Block a user