Skip to content

Commit

Permalink
Fix async update (#94)
Browse files Browse the repository at this point in the history
* Fix Creds for connection call

* Fix Async Update
  • Loading branch information
ruuushhh authored Feb 13, 2024
1 parent a6642d0 commit cc2ac0d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/workspaces/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
from apps.business_central.exports.journal_entry.tasks import ExportJournalEntry
from apps.business_central.exports.purchase_invoice.tasks import ExportPurchaseInvoice
from apps.fyle.queue import queue_import_credit_card_expenses, queue_import_reimbursable_expenses
from apps.workspaces.models import AdvancedSetting, ExportSetting
from apps.workspaces.models import AdvancedSetting, ExportSetting, FyleCredential

logger = logging.getLogger(__name__)


# def async_update_fyle_credentials(fyle_org_id: str, refresh_token: str):
# fyle_credentials = FyleCredential.objects.filter(workspace__org_id=fyle_org_id).first()
# if fyle_credentials:
# fyle_credentials.refresh_token = refresh_token
# fyle_credentials.save()
def async_update_fyle_credentials(fyle_org_id: str, refresh_token: str):
fyle_credentials = FyleCredential.objects.filter(workspace__org_id=fyle_org_id).first()
if fyle_credentials:
fyle_credentials.refresh_token = refresh_token
fyle_credentials.save()


def run_import_export(workspace_id: int, export_mode = None):
Expand Down

0 comments on commit cc2ac0d

Please sign in to comment.