Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Connection #92

Merged
merged 6 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/business_central/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def sync_dimensions(business_central_credential: BusinessCentralCredentials, wor
business_central_connection = import_string('apps.business_central.utils.BusinessCentralConnector')(business_central_credential, workspace_id)

# List of dimensions to sync
dimensions = ['accounts', 'vendors', 'employees', 'locations', 'companies']
dimensions = ['companies', 'accounts', 'vendors', 'employees', 'locations']

for dimension in dimensions:
try:
Expand Down
2 changes: 1 addition & 1 deletion apps/business_central/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ def get_company(self, workspace_id):
business_central_credentials.refresh_token = None
business_central_credentials.is_expired = True
business_central_credentials.save()
return Response(data={'message': 'Invalid token or Business Central connection expired'}, status=status.HTTP_400_BAD_REQUEST)
return Response(data={'message': 'Invalid token or Business Central connection expired'}, status=status.HTTP_400_BAD_REQUEST)
2 changes: 1 addition & 1 deletion apps/business_central/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ class ConnectionView(generics.RetrieveAPIView):
serializer_class = Connectionserializer

def get(self, request, *args, **kwargs):
return Connectionserializer.get_company(kwargs['workspace_id'])
return Connectionserializer().get_company(kwargs['workspace_id'])
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gunicorn==20.1.0
fyle==0.36.0

# Business central sdk
ms-dynamics-business-central-sdk==1.4.1
ms-dynamics-business-central-sdk==1.4.2

# Reusable Fyle Packages
fyle-rest-auth==1.6.0
Expand Down
Loading