Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
it-bott-integrasjoner
topdesk-client
Commits
48589d0d
Commit
48589d0d
authored
Sep 12, 2019
by
Jo Sama
😱
Browse files
Exclude/include fields when serializing
parent
a1ce2c93
Changes
1
Hide whitespace changes
Inline
Side-by-side
topdesk_client/models.py
View file @
48589d0d
...
...
@@ -153,6 +153,10 @@ class BranchReference(BaseModel):
'extra_b'
:
{
'alias'
:
'extraB'
},
}
def
dict
(
self
,
*
args
,
**
kwargs
):
kwargs
[
'include'
]
=
{
'id'
}
return
super
(
BranchReference
,
self
).
dict
(
*
args
,
**
kwargs
)
class
Operator
(
BaseModel
):
id
:
Optional
[
str
]
...
...
@@ -173,6 +177,10 @@ class Operator(BaseModel):
'mobile'
:
{
'alias'
:
'mobileNumber'
},
}
def
dict
(
self
,
*
args
,
**
kwargs
):
kwargs
[
'exclude'
]
=
{
'id'
}
return
super
(
Operator
,
self
).
dict
(
*
args
,
**
kwargs
)
class
Person
(
BaseModel
):
id
:
Optional
[
str
]
...
...
@@ -194,3 +202,7 @@ class Person(BaseModel):
'phone'
:
'phoneNumber'
,
'mobile'
:
'mobileNumber'
}
def
dict
(
self
,
*
args
,
**
kwargs
):
kwargs
[
'exclude'
]
=
{
'id'
}
return
super
(
Person
,
self
).
dict
(
*
args
,
**
kwargs
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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