Citadel: Do not send 'notes/minutes' in note title

This commit is contained in:
Adrian Moennich 2021-05-17 11:20:02 +02:00
parent 069b26949c
commit 57ed55b731
2 changed files with 2 additions and 2 deletions

View File

@ -204,7 +204,7 @@ class _EventNoteDataSchema(EventNoteSchema):
class Meta:
fields = ('title', 'content', 'user')
title = mm.Function(lambda note: f'{note.object.title} - Notes/Minutes')
title = mm.String(attribute='object.title')
@post_dump
def _transform(self, data, **kwargs):

View File

@ -246,7 +246,7 @@ def test_dump_event_note(db, dummy_user, dummy_event, dummy_contribution, link_t
'_data': {
'content': 'this is a dummy note',
'site': 'http://localhost',
'title': f'{note.object.title} - Notes/Minutes',
'title': note.object.title,
'persons': {'name': 'Guinea Pig'}
},
'category_id': category_id,