Skip to content

Commit

Permalink
unfuck tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rashfael committed Jun 28, 2018
1 parent c48151f commit 571c9ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions server/eventomat/event/serialisers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

class UserSerialiser(serializers.ModelSerializer):

class Meta:
model = User
fields = ('id', 'username')


class OwnUserSerialiser(serializers.ModelSerializer):

class Meta:
model = User
fields = ('id', 'username', 'is_staff')
Expand Down
6 changes: 3 additions & 3 deletions server/eventomat/event/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from .models import Attendance, Event, Room, Series
from .permissions import KeyholderPermission
from .serialisers import (
EventEditSerialiser, EventListSerialiser, RoomSerialiser,
SeriesEditSerialiser, SeriesListSerialiser, UserSerialiser,
EventEditSerialiser, EventListSerialiser, OwnUserSerialiser,
RoomSerialiser, SeriesEditSerialiser, SeriesListSerialiser,
)


Expand Down Expand Up @@ -89,5 +89,5 @@ def perform_destroy(self, instance):

class OwnUser(APIView):
def get(self, request):
serializer = UserSerialiser(request.user)
serializer = OwnUserSerialiser(request.user)
return Response(serializer.data)

0 comments on commit 571c9ae

Please # to comment.