Skip to content
Snippets Groups Projects
Commit fa9159bb authored by ynerant's avatar ynerant
Browse files

Alias pk != Note pk

parent 45492551
No related branches found
No related tags found
1 merge request!86Pre-beta fixes
Pipeline #8265 failed with stages
in 1 minute and 57 seconds
......@@ -118,9 +118,8 @@ class ConsumerSerializer(serializers.ModelSerializer):
"""
# If the user has no right to see the note, then we only display the note identifier
if PermissionBackend.check_perm(get_current_authenticated_user(), "note.view_note", obj.note):
print(obj.pk)
return NotePolymorphicSerializer().to_representation(obj.note)
return dict(id=obj.id)
return dict(id=obj.note.id)
def get_email_confirmed(self, obj):
if isinstance(obj.note, NoteUser):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment