Skip to content

Commit 20d1e06

Browse files
committed
fix: update cache for migrated orgs (#921)
1 parent 3f0ed6c commit 20d1e06

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/sage_intacct/helpers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
from django.conf import settings
66
from django_q.models import Schedule
7+
from django.core.cache import cache
78

9+
from apps.workspaces.enums import CacheKeyEnum
810
from apps.fyle.models import DependentFieldSetting
911
from apps.sage_intacct.utils import SageIntacctConnector
1012
from apps.sage_intacct.enums import SageIntacctRestConnectionTypeEnum
@@ -162,5 +164,6 @@ def validate_rest_api_connection(workspace_id: int) -> None:
162164
updated_at=datetime.now(timezone.utc)
163165
)
164166
sync_dimensions(workspace_id=workspace_id)
167+
cache.set(CacheKeyEnum.FEATURE_CONFIG_MIGRATED_TO_REST_API.value.format(workspace_id=workspace_id), True, 172800)
165168
except Exception as e:
166169
logger.info('REST API is not working for workspace_id - %s, error - %s', workspace_id, e)

0 commit comments

Comments
 (0)