-
Notifications
You must be signed in to change notification settings - Fork 0
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
upate workspace last synced fix #320
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,8 @@ | |
from typing import Dict, List | ||
|
||
from django.db import transaction | ||
from fyle.platform.exceptions import ( | ||
InvalidTokenError as FyleInvalidTokenError, | ||
RetryException, | ||
) | ||
from fyle.platform.exceptions import InvalidTokenError as FyleInvalidTokenError | ||
from fyle.platform.exceptions import RetryException | ||
from fyle_integrations_platform_connector import PlatformConnector | ||
|
||
from apps.fyle.actions import create_generator_and_post_in_batches | ||
|
@@ -103,7 +101,7 @@ def async_create_expense_groups( | |
) | ||
) | ||
|
||
if expenses: | ||
if workspace.last_synced_at or expenses: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic for updating |
||
workspace.last_synced_at = datetime.now() | ||
reimbursable_expenses_count += len(expenses) | ||
|
||
|
@@ -126,7 +124,7 @@ def async_create_expense_groups( | |
) | ||
) | ||
|
||
if len(expenses) != reimbursable_expenses_count: | ||
if workspace.ccc_last_synced_at or len(expenses) != reimbursable_expenses_count: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the previous comment, the update to |
||
workspace.ccc_last_synced_at = datetime.now() | ||
|
||
workspace.save() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging sensitive information, such as workspace IDs, could potentially expose them in logs which might not be secure. While the logged message "Fyle credentials not found %s" is not directly logging sensitive information, it's a good practice to review what is being logged and ensure that no sensitive data is inadvertently exposed. Consider revising the logging strategy to minimize the risk of exposing sensitive information.