Skip to content

Commit

Permalink
Fix error api (#101)
Browse files Browse the repository at this point in the history
* Fix Creds for connection call

* Error API fix

* Error API fix

* Pagination

* Pagination
  • Loading branch information
ruuushhh authored Feb 23, 2024
1 parent ed61812 commit b0b56e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/accounting_exports/serializers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rest_framework import serializers
from fyle_accounting_mappings.serializers import ExpenseAttributeSerializer
from rest_framework import serializers

from apps.accounting_exports.models import AccountingExport, AccountingExportSummary, Error
from apps.fyle.serializers import ExpenseSerializer
Expand All @@ -10,6 +10,7 @@ class AccountingExportSerializer(serializers.ModelSerializer):
Accounting Export serializer
"""

id = serializers.IntegerField()
expenses = ExpenseSerializer(many=True)

class Meta:
Expand All @@ -31,7 +32,7 @@ class ErrorSerializer(serializers.ModelSerializer):
"""
Serializer for the Errors
"""

accounting_export = AccountingExportSerializer()
expense_attribute = ExpenseAttributeSerializer()

class Meta:
Expand Down
1 change: 1 addition & 0 deletions apps/accounting_exports/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class AccountingExportSummaryView(generics.RetrieveAPIView):

class ErrorsView(LookupFieldMixin, generics.ListAPIView):
serializer_class = ErrorSerializer

queryset = Error.objects.all()
filter_backends = (DjangoFilterBackend,)
filterset_fields = {"type": {"exact"}, "is_resolved": {"exact"}}

0 comments on commit b0b56e6

Please sign in to comment.