Guest User

Untitled

a guest
Jan 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. diff --git a/indico/modules/events/schemas.py b/indico/modules/events/schemas.py
  2. index 7e54a59e9..f799e5f98 100644
  3. --- a/indico/modules/events/schemas.py
  4. +++ b/indico/modules/events/schemas.py
  5. @@ -16,9 +16,14 @@
  6.  
  7. from __future__ import unicode_literals
  8.  
  9. +from marshmallow import fields
  10. +
  11. from indico.core.marshmallow import mm
  12.  
  13.  
  14. class PersonLinkSchema(mm.Schema):
  15. + author_type = fields.Function(lambda obj: None if obj.author_type.name == 'none' else obj.author_type.name)
  16. +
  17. class Meta:
  18. - fields = ('id', 'person_id', 'email', 'first_name', 'last_name', 'title', 'affiliation', 'address', 'phone')
  19. + additional = ('id', 'person_id', 'email', 'first_name', 'last_name', 'title', 'affiliation', 'address',
  20. + 'phone', 'is_speaker')
Add Comment
Please, Sign In to add comment