Coverage for django_napse/api/transactions/serializers/transaction_serializer.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-03-12 13:49 +0000

1from rest_framework import serializers 

2 

3from django_napse.core.models import Transaction 

4 

5 

6class TransactionSerializer(serializers.ModelSerializer): 

7 operation_type = serializers.CharField(default="TRANSACTION") 

8 

9 class Meta: 

10 model = Transaction 

11 fields = [ 

12 "amount", 

13 "ticker", 

14 "operation_type", 

15 "created_at", 

16 ] 

17 read_only_fields = fields