Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
campaign
Commits
d81fa378
Commit
d81fa378
authored
Nov 22, 2014
by
Aymeric Barantal
Browse files
output contact_id on /contacts API
parent
2444d374
Changes
1
Hide whitespace changes
Inline
Side-by-side
picampaign/campaign/serializers.py
View file @
d81fa378
...
...
@@ -23,7 +23,9 @@ class CampaignContactSerializer(serializers.HyperlinkedModelSerializer):
last_name
=
serializers
.
Field
(
source
=
'contact.last_name'
)
phone
=
serializers
.
Field
(
source
=
'contact.phone'
)
groups
=
serializers
.
Field
(
source
=
'all_groups'
)
contact_id
=
serializers
.
Field
(
source
=
'contact.id'
)
class
Meta
:
model
=
CampaignContact
fields
=
(
'id'
,
'weight'
,
'first_name'
,
'last_name'
,
'phone'
,
'groups'
)
fields
=
(
'id'
,
'weight'
,
'contact_id'
,
'first_name'
,
'last_name'
,
'phone'
,
'groups'
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment