mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-16 22:09:27 +08:00
Add course to slug related field for borrower in transaction serializer
This commit is contained in:
parent
2ddc9da179
commit
7a8281dabd
1 changed files with 2 additions and 1 deletions
|
@ -9,10 +9,11 @@ from config.settings import DEBUG
|
||||||
|
|
||||||
class CustomUserSerializer(serializers.ModelSerializer):
|
class CustomUserSerializer(serializers.ModelSerializer):
|
||||||
name = serializers.CharField(source='__str__')
|
name = serializers.CharField(source='__str__')
|
||||||
|
course = serializers.CharField()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = CustomUser
|
model = CustomUser
|
||||||
fields = ['id', 'name']
|
fields = ['id', 'name', 'course']
|
||||||
|
|
||||||
|
|
||||||
class EquipmentInstanceSerializer(serializers.ModelSerializer):
|
class EquipmentInstanceSerializer(serializers.ModelSerializer):
|
||||||
|
|
Loading…
Reference in a new issue